From 5db1a67c20cdee1fd0e8e436563e98b694e5d6da Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Mar 2020 22:43:09 -0500 Subject: [PATCH] Make powerwall unique id stable (#33021) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update powerwall unique id * Fix somfy optimistic mode when missing in conf (#32995) * Fix optimistic mode when missing in conf #32971 * Ease code using a default value * Client id and secret are now inclusive * Bump aiohomekit to fix Insignia NS-CH1XGO8 and Lennox S30 (#33014) * Axis - Fix char in stream url (#33004) * An unwanted character had found its way into a stream string, reverting f-string work to remove duplication of code and improve readability * Fix failing tests * deCONZ - Add support for Senic and Gira Friends of Hue remote… (#33022) * Update the test * Harmony config flow improvements (#33018) * Harmony config flow improvements * Address followup review comments from #32919 * pylint -- catching my naming error * remove leftovers from refactor * Update powerwall unique id * Update the test Co-authored-by: tetienne Co-authored-by: Jc2k Co-authored-by: Robert Svensson --- homeassistant/components/powerwall/entity.py | 2 -- tests/components/powerwall/test_sensor.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/powerwall/entity.py b/homeassistant/components/powerwall/entity.py index 0411f956bdc3..04bb75fd47a2 100644 --- a/homeassistant/components/powerwall/entity.py +++ b/homeassistant/components/powerwall/entity.py @@ -9,7 +9,6 @@ from .const import ( POWERWALL_SITE_NAME, SITE_INFO_GRID_CODE, SITE_INFO_NOMINAL_SYSTEM_ENERGY_KWH, - SITE_INFO_NOMINAL_SYSTEM_POWER_KW, SITE_INFO_UTILITY, ) @@ -26,7 +25,6 @@ class PowerWallEntity(Entity): unique_group = ( site_info[SITE_INFO_UTILITY], site_info[SITE_INFO_GRID_CODE], - str(site_info[SITE_INFO_NOMINAL_SYSTEM_POWER_KW]), str(site_info[SITE_INFO_NOMINAL_SYSTEM_ENERGY_KWH]), ) self.base_unique_id = "_".join(unique_group) diff --git a/tests/components/powerwall/test_sensor.py b/tests/components/powerwall/test_sensor.py index ea74f33671fa..090e5dac445e 100644 --- a/tests/components/powerwall/test_sensor.py +++ b/tests/components/powerwall/test_sensor.py @@ -24,7 +24,7 @@ async def test_sensors(hass): device_registry = await hass.helpers.device_registry.async_get_registry() reg_device = device_registry.async_get_device( - identifiers={("powerwall", "Wom Energy_60Hz_240V_s_IEEE1547a_2014_25_13.5")}, + identifiers={("powerwall", "Wom Energy_60Hz_240V_s_IEEE1547a_2014_13.5")}, connections=set(), ) assert reg_device.model == "PowerWall 2"