mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
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:
parent
1a4199c485
commit
5db1a67c20
@ -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)
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user