mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Support rfxtrx smoke detectors, motion sensors as binary_sensors (#38000)
* Add binary sensor support to motion sensors and smoke detectors * Add support for new sensor events as binary sensors Adds a default device_class for motion sensors and smoke detector * Use device type instead of event to set class * Add some additional binary values
This commit is contained in:
@@ -148,13 +148,9 @@ async def test_several_sensors(hass, rfxtrx):
|
||||
assert state.attributes.get("unit_of_measurement") == UNIT_PERCENTAGE
|
||||
|
||||
|
||||
async def test_discover_sensor(hass, rfxtrx):
|
||||
async def test_discover_sensor(hass, rfxtrx_automatic):
|
||||
"""Test with discovery of sensor."""
|
||||
assert await async_setup_component(
|
||||
hass, "rfxtrx", {"rfxtrx": {"device": "abcd", "automatic_add": True}},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_start()
|
||||
rfxtrx = rfxtrx_automatic
|
||||
|
||||
# 1
|
||||
await rfxtrx.signal("0a520801070100b81b0279")
|
||||
|
||||
Reference in New Issue
Block a user