Skip to content

Commit

Permalink
Rename Devices to Entities
Browse files Browse the repository at this point in the history
  • Loading branch information
vassilis-panos committed May 14, 2020
1 parent 2e51a3e commit 0b6e85d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions custom_components/smartir/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions custom_components/smartir/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0b6e85d

Please sign in to comment.