Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some classes are deprecated #17

Merged
merged 8 commits into from
Jun 14, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import timedelta

from homeassistant.components.binary_sensor import (
BinarySensorDevice, DEVICE_CLASSES)
BinarySensorEntity, DEVICE_CLASSES)

from homeassistant.helpers.event import async_track_point_in_utc_time
import homeassistant.util.dt as dt_util
Expand Down Expand Up @@ -78,7 +78,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(entities)
return True

class XiaomiGwBinarySensor(XiaomiGwDevice, BinarySensorDevice):
class XiaomiGwBinarySensor(XiaomiGwDevice, BinarySensorEntity):

def __init__(self, gw, device_class, sid, name, restore):
XiaomiGwDevice.__init__(self, gw, "binary_sensor", device_class, sid, name, restore)
Expand Down