mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Allow binary sensor state to be None (#60193)
This commit is contained in:
@@ -8,7 +8,7 @@ from homeassistant.const import STATE_OFF, STATE_ON
|
||||
def test_state():
|
||||
"""Test binary sensor state."""
|
||||
sensor = binary_sensor.BinarySensorEntity()
|
||||
assert sensor.state == STATE_OFF
|
||||
assert sensor.state is None
|
||||
with mock.patch(
|
||||
"homeassistant.components.binary_sensor.BinarySensorEntity.is_on",
|
||||
new=False,
|
||||
|
||||
Reference in New Issue
Block a user