Skip to content

Commit

Permalink
Remove profile from empty response.
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic committed Nov 13, 2023
1 parent 9e9d3f1 commit 75b28c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions pyplumio/structures/thermostat_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,7 @@ def decode(
and (thermostats := sender.get_nowait(ATTR_THERMOSTATS_CONNECTED, 0)) == 0
):
return (
ensure_dict(
data,
{ATTR_THERMOSTAT_PARAMETERS: None, ATTR_THERMOSTAT_PROFILE: None},
),
ensure_dict(data, {ATTR_THERMOSTAT_PARAMETERS: None}),
offset,
)

Expand Down
2 changes: 0 additions & 2 deletions tests/test_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ async def test_thermostat_parameters_callbacks_without_thermostats(
ecomax.handle_frame(ThermostatParametersResponse(message=test_data["message"]))
await ecomax.wait_until_done()
assert not await ecomax.get(ATTR_THERMOSTAT_PARAMETERS)
thermostat_profile = await ecomax.get(ATTR_THERMOSTAT_PROFILE)
assert thermostat_profile is None


async def test_thermostat_profile_callbacks(ecomax: EcoMAX) -> None:
Expand Down

0 comments on commit 75b28c7

Please sign in to comment.