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:
1 parent
84df0efb5e
commit
632a36d819
7 files changed
+160
-62
No files matched your search
@@ -120,13 +120,9 @@ async def test_repetitions(hass, rfxtrx, repetitions):
|
||||
assert rfxtrx.transport.send.call_count == repetitions
|
||||
|
||||
|
||||
async def test_discover_switch(hass, rfxtrx):
|
||||
async def test_discover_switch(hass, rfxtrx_automatic):
|
||||
"""Test with discovery of switches."""
|
||||
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
|
||||
|
||||
await rfxtrx.signal("0b1100100118cdea02010f70")
|
||||
state = hass.states.get("switch.ac_118cdea_2")
|
||||
|
||||
Reference in new issue
Block a user