Light control support to Axis devices (#36611)

* IR light support to Axis devices

* Change how to read light state

* Add tests

* Bump dependency to v32

* Assert variables passed to set_intensity
This commit is contained in:
Robert Svensson 2020-06-18 23:27:08 +02:00 committed by GitHub
parent e92e26b73a
commit 02e03340df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 301 additions and 8 deletions

View file

@ -42,7 +42,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add binary sensor from Axis device."""
event = device.api.event[event_id]
if event.CLASS != CLASS_OUTPUT:
if event.CLASS != CLASS_OUTPUT and not (
event.CLASS == CLASS_LIGHT and event.TYPE == "Light"
):
async_add_entities([AxisBinarySensor(event, device)], True)
device.listeners.append(