From 0b6e85d99c6d79a8fa3912e6270130fafd786439 Mon Sep 17 00:00:00 2001 From: Vassilis Panos <4130346+vassilis-panos@users.noreply.github.com> Date: Thu, 14 May 2020 16:48:10 +0300 Subject: [PATCH] Rename Devices to Entities --- custom_components/smartir/climate.py | 4 ++-- custom_components/smartir/media_player.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/smartir/climate.py b/custom_components/smartir/climate.py index dd864061..26e53c96 100644 --- a/custom_components/smartir/climate.py +++ b/custom_components/smartir/climate.py @@ -5,7 +5,7 @@ import voluptuous as vol -from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA +from homeassistant.components.climate import ClimateEntity, PLATFORM_SCHEMA from homeassistant.components.climate.const import ( HVAC_MODE_OFF, HVAC_MODE_HEAT, HVAC_MODE_COOL, HVAC_MODE_DRY, HVAC_MODE_FAN_ONLY, HVAC_MODE_AUTO, @@ -87,7 +87,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= hass, config, device_data )]) -class SmartIRClimate(ClimateDevice, RestoreEntity): +class SmartIRClimate(ClimateEntity, RestoreEntity): def __init__(self, hass, config, device_data): self.hass = hass self._unique_id = config.get(CONF_UNIQUE_ID) diff --git a/custom_components/smartir/media_player.py b/custom_components/smartir/media_player.py index f47ca331..c293ddee 100644 --- a/custom_components/smartir/media_player.py +++ b/custom_components/smartir/media_player.py @@ -6,7 +6,7 @@ import voluptuous as vol from homeassistant.components.media_player import ( - MediaPlayerDevice, PLATFORM_SCHEMA) + MediaPlayerEntity, PLATFORM_SCHEMA) from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_PREVIOUS_TRACK, SUPPORT_NEXT_TRACK, SUPPORT_VOLUME_STEP, SUPPORT_VOLUME_MUTE, @@ -80,7 +80,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= hass, config, device_data )]) -class SmartIRMediaPlayer(MediaPlayerDevice, RestoreEntity): +class SmartIRMediaPlayer(MediaPlayerEntity, RestoreEntity): def __init__(self, hass, config, device_data): self.hass = hass self._unique_id = config.get(CONF_UNIQUE_ID)