Make powerwall unique id stable (#33021)

* 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 <thibaut@etienne.pw>
Co-authored-by: Jc2k <john.carr@unrouted.co.uk>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
This commit is contained in:
J. Nick Koston 2020-03-19 22:43:09 -05:00 committed by GitHub
parent 1a4199c485
commit 5db1a67c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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"