mirror of
https://github.com/home-assistant/core.git
synced 2026-05-19 23:35:20 +02:00
Use updated powerwall client API library (#34139)
* Use updated powerwall client API library * Increase instant_power precision to 3 * Add @jrester as code owner for powerwall
This commit is contained in:
@@ -15,10 +15,10 @@ async def test_sensors(hass):
|
||||
mock_powerwall = await _mock_powerwall_with_fixtures(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.powerwall.config_flow.PowerWall",
|
||||
"homeassistant.components.powerwall.config_flow.Powerwall",
|
||||
return_value=mock_powerwall,
|
||||
), patch(
|
||||
"homeassistant.components.powerwall.PowerWall", return_value=mock_powerwall
|
||||
"homeassistant.components.powerwall.Powerwall", return_value=mock_powerwall
|
||||
):
|
||||
assert await async_setup_component(hass, DOMAIN, _mock_get_config())
|
||||
await hass.async_block_till_done()
|
||||
@@ -28,7 +28,7 @@ async def test_sensors(hass):
|
||||
identifiers={("powerwall", "Wom Energy_60Hz_240V_s_IEEE1547a_2014_13.5")},
|
||||
connections=set(),
|
||||
)
|
||||
assert reg_device.model == "PowerWall 2 (hec)"
|
||||
assert reg_device.model == "PowerWall 2 (GW1)"
|
||||
assert reg_device.sw_version == "1.45.1"
|
||||
assert reg_device.manufacturer == "Tesla"
|
||||
assert reg_device.name == "MySite"
|
||||
@@ -98,7 +98,7 @@ async def test_sensors(hass):
|
||||
assert state.attributes[key] == value
|
||||
|
||||
state = hass.states.get("sensor.powerwall_charge")
|
||||
assert state.state == "47.32"
|
||||
assert state.state == "47"
|
||||
expected_attributes = {
|
||||
"unit_of_measurement": UNIT_PERCENTAGE,
|
||||
"friendly_name": "Powerwall Charge",
|
||||
|
||||
Reference in New Issue
Block a user