Use serial numbers for unique_id of powerwall devices (#34351)

* Update tesla-powerwall to version 0.2.5

* Create unique_id from serial numbers of powerwalls
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/binary_sensor.py
	modified:   homeassistant/components/powerwall/const.py
	modified:   homeassistant/components/powerwall/entity.py
	modified:   homeassistant/components/powerwall/sensor.py
	modified:   tests/components/powerwall/mocks.py
	modified:   tests/components/powerwall/test_sensor.py

* Fix pylint error
	modified:   homeassistant/components/powerwall/__init__.py
This commit is contained in:
jrester authored and GitHub committed 2020-04-17 16:21:14 -05:00
1 parent 618538aeff
commit 3776a06281
7 files changed
+83 -16

No files matched your search

+1 -2
View File
@@ -25,8 +25,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_13.5")},
connections=set(),
identifiers={("powerwall", "TG0123456789AB_TG9876543210BA")}, connections=set(),
)
assert reg_device.model == "PowerWall 2 (GW1)"
assert reg_device.sw_version == "1.45.1"