Skip to content

Commit

Permalink
enable binary_sensor for smart gardena
Browse files Browse the repository at this point in the history
  • Loading branch information
grm committed Jun 6, 2020
1 parent 9994493 commit 11fa83b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/gardena_smart_system/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_LOGGER = logging.getLogger(__name__)

PLATFORMS = ("vacuum", "sensor", "switch")
PLATFORMS = ("vacuum", "sensor", "switch", "binary_sensor")


async def async_setup(hass: HomeAssistant, config: dict):
Expand Down
3 changes: 2 additions & 1 deletion custom_components/gardena_smart_system/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
BinarySensorEntity,
)

from custom_components.gardena_smart_system import GARDENA_SYSTEM
from .const import DOMAIN


async def async_setup_entry(hass, config_entry, async_add_entities):
"""Perform the setup for Gardena websocket connection status."""
async_add_entities(SmartSystemWebsocketStatus(hass.data[DOMAIN]), True)
async_add_entities([SmartSystemWebsocketStatus(hass.data[DOMAIN][GARDENA_SYSTEM])], True)


class SmartSystemWebsocketStatus(BinarySensorEntity):
Expand Down

0 comments on commit 11fa83b

Please sign in to comment.