diff --git a/homeassistant/components/plugwise/manifest.json b/homeassistant/components/plugwise/manifest.json index 4f1417ae018..f0624f8c026 100644 --- a/homeassistant/components/plugwise/manifest.json +++ b/homeassistant/components/plugwise/manifest.json @@ -2,7 +2,7 @@ "domain": "plugwise", "name": "Plugwise", "documentation": "https://www.home-assistant.io/integrations/plugwise", - "requirements": ["plugwise==0.16.6"], + "requirements": ["plugwise==0.16.8"], "codeowners": ["@CoMPaTech", "@bouwew", "@brefra", "@frenck"], "zeroconf": ["_plugwise._tcp.local."], "config_flow": true, diff --git a/homeassistant/components/plugwise/sensor.py b/homeassistant/components/plugwise/sensor.py index 4ee75e21a45..9099ee96990 100644 --- a/homeassistant/components/plugwise/sensor.py +++ b/homeassistant/components/plugwise/sensor.py @@ -267,7 +267,7 @@ async def async_setup_entry( """Set up the Smile sensors from a config entry.""" coordinator = hass.data[DOMAIN][config_entry.entry_id] - entities: list[PlugwiseSensorEnity] = [] + entities: list[PlugwiseSensorEntity] = [] for device_id, device in coordinator.data.devices.items(): for description in SENSORS: if ( @@ -277,7 +277,7 @@ async def async_setup_entry( continue entities.append( - PlugwiseSensorEnity( + PlugwiseSensorEntity( coordinator, device_id, description, @@ -287,7 +287,7 @@ async def async_setup_entry( async_add_entities(entities) -class PlugwiseSensorEnity(PlugwiseEntity, SensorEntity): +class PlugwiseSensorEntity(PlugwiseEntity, SensorEntity): """Represent Plugwise Sensors.""" def __init__( diff --git a/requirements_all.txt b/requirements_all.txt index 43718353a09..fa5ab8613fb 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1214,7 +1214,7 @@ plexauth==0.0.6 plexwebsocket==0.0.13 # homeassistant.components.plugwise -plugwise==0.16.6 +plugwise==0.16.8 # homeassistant.components.plum_lightpad plumlightpad==0.0.11 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 3976b5a73ba..9cbb9bccff8 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -799,7 +799,7 @@ plexauth==0.0.6 plexwebsocket==0.0.13 # homeassistant.components.plugwise -plugwise==0.16.6 +plugwise==0.16.8 # homeassistant.components.plum_lightpad plumlightpad==0.0.11 diff --git a/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json b/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json index 65b96074cc0..92b2321621d 100644 --- a/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json +++ b/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json @@ -20,7 +20,7 @@ "model": "Lisa", "name": "Zone Lisa Bios", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": [ @@ -66,7 +66,7 @@ "mode": "heat", "sensors": { "temperature": 16.5, - "setpoint": 13, + "setpoint": 13.0, "battery": 67 } }, @@ -79,7 +79,7 @@ "model": "Tom/Floor", "name": "Floor kraan", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { @@ -98,12 +98,12 @@ "model": "Tom/Floor", "name": "Bios Cv Thermostatic Radiator ", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { "temperature": 17.2, - "setpoint": 13, + "setpoint": 13.0, "battery": 62, "temperature_difference": -0.2, "valve_position": 0.0 @@ -118,7 +118,7 @@ "model": "Lisa", "name": "Zone Lisa WK", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": [ @@ -194,12 +194,12 @@ "model": "Tom/Floor", "name": "Thermostatic Radiator Jessie", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { "temperature": 17.1, - "setpoint": 15, + "setpoint": 15.0, "battery": 62, "temperature_difference": 0.1, "valve_position": 0.0 @@ -255,9 +255,6 @@ "model": "Unknown", "name": "OnOff", "vendor": null, - "lower_bound": 10, - "upper_bound": 90, - "resolution": 1, "binary_sensors": { "heating_state": true }, @@ -360,7 +357,7 @@ "model": "Lisa", "name": "Zone Thermostat Jessie", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": [ @@ -406,7 +403,7 @@ "mode": "auto", "sensors": { "temperature": 17.2, - "setpoint": 15, + "setpoint": 15.0, "battery": 37 } }, @@ -419,12 +416,12 @@ "model": "Tom/Floor", "name": "Thermostatic Radiator Badkamer", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { "temperature": 19.1, - "setpoint": 14, + "setpoint": 14.0, "battery": 51, "temperature_difference": -0.4, "valve_position": 0.0 @@ -439,7 +436,7 @@ "model": "Lisa", "name": "Zone Thermostat Badkamer", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": [ @@ -485,7 +482,7 @@ "mode": "auto", "sensors": { "temperature": 18.9, - "setpoint": 14, + "setpoint": 14.0, "battery": 92 } }, @@ -519,7 +516,7 @@ "model": "Tom/Floor", "name": "CV Kraan Garage", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "preset_modes": [ diff --git a/tests/components/plugwise/fixtures/anna_heatpump/all_data.json b/tests/components/plugwise/fixtures/anna_heatpump/all_data.json index e9e62b77bb0..d6b0744744d 100644 --- a/tests/components/plugwise/fixtures/anna_heatpump/all_data.json +++ b/tests/components/plugwise/fixtures/anna_heatpump/all_data.json @@ -16,9 +16,6 @@ "model": "Generic heater", "name": "OpenTherm", "vendor": "Techneco", - "lower_bound": -10, - "upper_bound": 40, - "resolution": 1, "compressor_state": true, "binary_sensors": { "dhw_state": false, @@ -37,8 +34,7 @@ }, "switches": { "dhw_cm_switch": false - }, - "cooling_active": false + } }, "015ae9ea3f964e668e490fa39da3870b": { "class": "gateway", @@ -65,8 +61,8 @@ "model": "Anna", "name": "Anna", "vendor": "Plugwise", - "lower_bound": 4, - "upper_bound": 30, + "lower_bound": 4.0, + "upper_bound": 30.0, "resolution": 0.1, "preset_modes": [ "no_frost", @@ -107,10 +103,10 @@ "mode": "heat", "sensors": { "temperature": 19.3, - "setpoint": 21, + "setpoint": 21.0, "illuminance": 86.0, "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4 + "cooling_deactivation_threshold": 4.0 } } } diff --git a/tests/components/plugwise/test_diagnostics.py b/tests/components/plugwise/test_diagnostics.py index 67ab7728d1c..8d544bfb363 100644 --- a/tests/components/plugwise/test_diagnostics.py +++ b/tests/components/plugwise/test_diagnostics.py @@ -40,7 +40,7 @@ async def test_diagnostics( "model": "Lisa", "name": "Zone Lisa Bios", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], @@ -63,7 +63,7 @@ async def test_diagnostics( "last_used": "Badkamer Schema", "schedule_temperature": 15.0, "mode": "heat", - "sensors": {"temperature": 16.5, "setpoint": 13, "battery": 67}, + "sensors": {"temperature": 16.5, "setpoint": 13.0, "battery": 67}, }, "b310b72a0e354bfab43089919b9a88bf": { "class": "thermo_sensor", @@ -74,7 +74,7 @@ async def test_diagnostics( "model": "Tom/Floor", "name": "Floor kraan", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { @@ -93,12 +93,12 @@ async def test_diagnostics( "model": "Tom/Floor", "name": "Bios Cv Thermostatic Radiator ", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { "temperature": 17.2, - "setpoint": 13, + "setpoint": 13.0, "battery": 62, "temperature_difference": -0.2, "valve_position": 0.0, @@ -113,7 +113,7 @@ async def test_diagnostics( "model": "Lisa", "name": "Zone Lisa WK", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], @@ -160,12 +160,12 @@ async def test_diagnostics( "model": "Tom/Floor", "name": "Thermostatic Radiator Jessie", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { "temperature": 17.1, - "setpoint": 15, + "setpoint": 15.0, "battery": 62, "temperature_difference": 0.1, "valve_position": 0.0, @@ -216,9 +216,6 @@ async def test_diagnostics( "model": "Unknown", "name": "OnOff", "vendor": None, - "lower_bound": 10, - "upper_bound": 90, - "resolution": 1, "binary_sensors": {"heating_state": True}, "sensors": { "water_temperature": 70.0, @@ -307,7 +304,7 @@ async def test_diagnostics( "model": "Lisa", "name": "Zone Thermostat Jessie", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], @@ -330,7 +327,7 @@ async def test_diagnostics( "last_used": "CV Jessie", "schedule_temperature": 15.0, "mode": "auto", - "sensors": {"temperature": 17.2, "setpoint": 15, "battery": 37}, + "sensors": {"temperature": 17.2, "setpoint": 15.0, "battery": 37}, }, "680423ff840043738f42cc7f1ff97a36": { "class": "thermo_sensor", @@ -341,12 +338,12 @@ async def test_diagnostics( "model": "Tom/Floor", "name": "Thermostatic Radiator Badkamer", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "sensors": { "temperature": 19.1, - "setpoint": 14, + "setpoint": 14.0, "battery": 51, "temperature_difference": -0.4, "valve_position": 0.0, @@ -361,7 +358,7 @@ async def test_diagnostics( "model": "Lisa", "name": "Zone Thermostat Badkamer", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], @@ -384,7 +381,7 @@ async def test_diagnostics( "last_used": "Badkamer Schema", "schedule_temperature": 15.0, "mode": "auto", - "sensors": {"temperature": 18.9, "setpoint": 14, "battery": 92}, + "sensors": {"temperature": 18.9, "setpoint": 14.0, "battery": 92}, }, "675416a629f343c495449970e2ca37b5": { "class": "router", @@ -413,7 +410,7 @@ async def test_diagnostics( "model": "Tom/Floor", "name": "CV Kraan Garage", "vendor": "Plugwise", - "lower_bound": 0, + "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], diff --git a/tests/components/plugwise/test_sensor.py b/tests/components/plugwise/test_sensor.py index 6f5309d3810..edb479354bb 100644 --- a/tests/components/plugwise/test_sensor.py +++ b/tests/components/plugwise/test_sensor.py @@ -56,8 +56,7 @@ async def test_anna_as_smt_climate_sensor_entities( async def test_anna_climate_sensor_entities( hass: HomeAssistant, mock_smile_anna: MagicMock, init_integration: MockConfigEntry ) -> None: - """Test creation of climate related sensor entities as single master thermostat.""" - mock_smile_anna.single_master_thermostat.return_value = False + """Test creation of climate related sensor entities.""" state = hass.states.get("sensor.opentherm_outdoor_temperature") assert state assert float(state.state) == 3.0