From 2d5faaf3f859933aee879c05bdd0f421d3aeb8cb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 11 Jun 2020 12:15:02 -0500 Subject: [PATCH] Remove powerwall attributes no longer present in latest firmware (#36667) --- homeassistant/components/powerwall/binary_sensor.py | 12 ------------ homeassistant/components/powerwall/const.py | 3 --- tests/components/powerwall/test_binary_sensor.py | 3 --- 3 files changed, 18 deletions(-) diff --git a/homeassistant/components/powerwall/binary_sensor.py b/homeassistant/components/powerwall/binary_sensor.py index 160a62a2029..b3fe9d977d3 100644 --- a/homeassistant/components/powerwall/binary_sensor.py +++ b/homeassistant/components/powerwall/binary_sensor.py @@ -11,9 +11,6 @@ from homeassistant.components.binary_sensor import ( from homeassistant.const import DEVICE_CLASS_POWER from .const import ( - ATTR_GRID_CODE, - ATTR_NOMINAL_SYSTEM_POWER, - ATTR_REGION, DOMAIN, POWERWALL_API_DEVICE_TYPE, POWERWALL_API_GRID_STATUS, @@ -79,15 +76,6 @@ class PowerWallRunningSensor(PowerWallEntity, BinarySensorEntity): """Get the powerwall running state.""" return self._coordinator.data[POWERWALL_API_SITEMASTER].running - @property - def device_state_attributes(self): - """Return the device specific state attributes.""" - return { - ATTR_REGION: self._site_info.region, - ATTR_GRID_CODE: self._site_info.grid_code, - ATTR_NOMINAL_SYSTEM_POWER: self._site_info.nominal_system_power_kW, - } - class PowerWallConnectedSensor(PowerWallEntity, BinarySensorEntity): """Representation of an Powerwall connected sensor.""" diff --git a/homeassistant/components/powerwall/const.py b/homeassistant/components/powerwall/const.py index 5f0e9ae3b35..caf08679652 100644 --- a/homeassistant/components/powerwall/const.py +++ b/homeassistant/components/powerwall/const.py @@ -8,13 +8,10 @@ POWERWALL_API_CHANGED = "api_changed" UPDATE_INTERVAL = 30 -ATTR_REGION = "region" -ATTR_GRID_CODE = "grid_code" ATTR_FREQUENCY = "frequency" ATTR_ENERGY_EXPORTED = "energy_exported_(in_kW)" ATTR_ENERGY_IMPORTED = "energy_imported_(in_kW)" ATTR_INSTANT_AVERAGE_VOLTAGE = "instant_average_voltage" -ATTR_NOMINAL_SYSTEM_POWER = "nominal_system_power_kW" ATTR_IS_ACTIVE = "is_active" STATUS_VERSION = "version" diff --git a/tests/components/powerwall/test_binary_sensor.py b/tests/components/powerwall/test_binary_sensor.py index fcca7fb34ab..1cdda033c12 100644 --- a/tests/components/powerwall/test_binary_sensor.py +++ b/tests/components/powerwall/test_binary_sensor.py @@ -33,9 +33,6 @@ async def test_sensors(hass): state = hass.states.get("binary_sensor.powerwall_status") assert state.state == STATE_ON expected_attributes = { - "region": "IEEE1547a:2014", - "grid_code": "60Hz_240V_s_IEEE1547a_2014", - "nominal_system_power_kW": 25, "friendly_name": "Powerwall Status", "device_class": "power", }