Fix mysensors battery level attribute (#101868)

This commit is contained in:
Martin Hjelmare 2023-10-12 13:01:08 +02:00 committed by GitHub
parent 8e3c665fd3
commit 52067dbfe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 43 additions and 7 deletions

View file

@ -7,6 +7,7 @@ from unittest.mock import MagicMock, call
from mysensors.sensor import Sensor
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from homeassistant.const import ATTR_BATTERY_LEVEL
from homeassistant.core import HomeAssistant
@ -23,6 +24,7 @@ async def test_relay_node(
assert state
assert state.state == "off"
assert state.attributes[ATTR_BATTERY_LEVEL] == 0
await hass.services.async_call(
SWITCH_DOMAIN,