Skip to content

Commit

Permalink
Merge pull request #108 from edenhaus/patch-1
Browse files Browse the repository at this point in the history
Update BinarySensorDevice to BinarySensorEntity
  • Loading branch information
isabellaalstrom authored Nov 16, 2020
2 parents 4a1618b + 8520c5f commit f49338f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions custom_components/grocy/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
"""Binary sensor platform for Grocy."""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
try:
from homeassistant.components.binary_sensor import BinarySensorEntity
except ImportError:
from homeassistant.components.binary_sensor import (
BinarySensorDevice as BinarySensorEntity,
)

# pylint: disable=relative-beyond-top-level
from .const import (
Expand Down Expand Up @@ -33,7 +38,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
async_add_entities(entities, True)


class GrocyBinarySensor(GrocyEntity, BinarySensorDevice):
class GrocyBinarySensor(GrocyEntity, BinarySensorEntity):
"""Grocy binary_sensor class."""

@property
Expand Down

0 comments on commit f49338f

Please sign in to comment.