From 19f6830369858b01c4c64caeb49ca103be47f93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isabella=20Gross=20Alstr=C3=B6m?= Date: Wed, 18 Nov 2020 10:55:48 +0100 Subject: [PATCH] Revert "Update BinarySensorDevice to BinarySensorEntity" --- custom_components/grocy/binary_sensor.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/custom_components/grocy/binary_sensor.py b/custom_components/grocy/binary_sensor.py index 672ee0a..24a2f0b 100644 --- a/custom_components/grocy/binary_sensor.py +++ b/custom_components/grocy/binary_sensor.py @@ -1,11 +1,6 @@ """Binary sensor platform for Grocy.""" import logging -try: - from homeassistant.components.binary_sensor import BinarySensorEntity -except ImportError: - from homeassistant.components.binary_sensor import ( - BinarySensorDevice as BinarySensorEntity, - ) +from homeassistant.components.binary_sensor import BinarySensorDevice # pylint: disable=relative-beyond-top-level from .const import ( @@ -38,7 +33,7 @@ async def async_setup_entry(hass, entry, async_add_entities): async_add_entities(entities, True) -class GrocyBinarySensor(GrocyEntity, BinarySensorEntity): +class GrocyBinarySensor(GrocyEntity, BinarySensorDevice): """Grocy binary_sensor class.""" @property