Fix mysensors battery level attribute (#101868)
This commit is contained in:
parent
8e3c665fd3
commit
52067dbfe5
10 changed files with 43 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue