Remove withings use of deprecated classes (#37611)

Adjusting in bed device class to occupancy.
pull/37618/head
Robert Van Gorkom 2020-07-07 10:17:04 -07:00 committed by GitHub
parent 663acfe89f
commit 09ee52c4cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -2,9 +2,9 @@
from typing import Callable, List
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_PRESENCE,
DEVICE_CLASS_OCCUPANCY,
DOMAIN as BINARY_SENSOR_DOMAIN,
BinarySensorDevice,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
@ -26,7 +26,7 @@ async def async_setup_entry(
async_add_entities(entities, True)
class WithingsHealthBinarySensor(BaseWithingsSensor, BinarySensorDevice):
class WithingsHealthBinarySensor(BaseWithingsSensor, BinarySensorEntity):
"""Implementation of a Withings sensor."""
@property
@ -37,4 +37,4 @@ class WithingsHealthBinarySensor(BaseWithingsSensor, BinarySensorDevice):
@property
def device_class(self) -> str:
"""Provide the device class."""
return DEVICE_CLASS_PRESENCE
return DEVICE_CLASS_OCCUPANCY