Skip to content

Commit

Permalink
Rename entity class name (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
N1c093 authored Jun 10, 2020
1 parent 787016d commit e1ca023
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/car_wash/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
from datetime import datetime

import voluptuous as vol
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
from homeassistant.components.weather import (
ATTR_FORECAST_PRECIPITATION,
ATTR_FORECAST_TIME,
Expand Down Expand Up @@ -68,7 +71,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
async_add_entities([CarWashBinarySensor(hass, name, weather, days)])


class CarWashBinarySensor(BinarySensorDevice):
class CarWashBinarySensor(BinarySensorEntity):
"""Implementation of an Car Wash binary sensor."""

def __init__(self, hass, friendly_name, weather_entity, days):
Expand Down

0 comments on commit e1ca023

Please sign in to comment.