Skip to content

Commit

Permalink
missed a conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jseidl authored and github-actions[bot] committed Jan 5, 2022
1 parent 586412d commit c88f7da
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 29 deletions.
3 changes: 1 addition & 2 deletions custom_components/magic_areas/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def target_temperature_low(self):
@property
def target_temperature_high(self):
return self._target_temp_high

@property
def should_poll(self):
"""No polling needed for a climate group."""
Expand All @@ -204,7 +204,6 @@ def extra_state_attributes(self):
"""Return the state attributes for the climate group."""
return {ATTR_ENTITY_ID: self._entity_ids}


async def async_set_temperature(self, **kwargs):
"""Forward the turn_on command to all climate in the climate group."""
data = {ATTR_ENTITY_ID: self._entity_ids}
Expand Down
4 changes: 0 additions & 4 deletions custom_components/magic_areas/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from custom_components.magic_areas.const import AVAILABLE_ON_STATES

import homeassistant.helpers.config_validation as cv
import voluptuous as vol
Expand All @@ -14,16 +13,13 @@
from .const import (
ALL_BINARY_SENSOR_DEVICE_CLASSES,
ALL_PRESENCE_DEVICE_PLATFORMS,
AVAILABLE_ON_STATES,
AREA_STATE_DARK,
AREA_STATE_EXTENDED,
AREA_STATE_OCCUPIED,
AREA_STATE_SLEEP,
AREA_TYPE_META,
AVAILABLE_ON_STATES,
BUILTIN_AREA_STATES,
CONF_ON_STATES,
CONF_NOTIFY_STATES,
CONF_ACCENT_ENTITY,
CONF_ACCENT_LIGHTS,
CONF_ACCENT_LIGHTS_ACT_ON,
Expand Down
4 changes: 3 additions & 1 deletion custom_components/magic_areas/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ def area_state_changed(self, area_id, states_tuple):
automatic_control = self.is_control_enabled()

if not automatic_control:
_LOGGER.debug(f"{self.name}: Automatic control for light group is disabled, skipping...")
_LOGGER.debug(
f"{self.name}: Automatic control for light group is disabled, skipping..."
)
return False

_LOGGER.debug(f"Light group {self.name} detected area state change")
Expand Down
22 changes: 0 additions & 22 deletions custom_components/magic_areas/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,16 @@
from .const import (
CONF_FEATURE_LIGHT_GROUPS,
CONF_FEATURE_PRESENCE_HOLD,
CONF_FEATURE_LIGHT_GROUPS,
CONF_PRESENCE_HOLD_TIMEOUT,
DATA_AREA_OBJECT,
DEFAULT_PRESENCE_HOLD_TIMEOUT,
ICON_LIGHT_CONTROL,
ICON_PRESENCE_HOLD,
MODULE_DATA,
ICON_PRESENCE_HOLD,
ICON_LIGHT_CONTROL
)

_LOGGER = logging.getLogger(__name__)

<<<<<<< HEAD


=======
>>>>>>> cb498d3def8a9ba35d45eadd5009c8f514f16a82

async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Area config entry."""
Expand All @@ -42,10 +34,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
if area.has_feature(CONF_FEATURE_LIGHT_GROUPS):
async_add_entities([AreaLightControlSwitch(hass, area)])

<<<<<<< HEAD
=======

>>>>>>> cb498d3def8a9ba35d45eadd5009c8f514f16a82
class AreaLightControlSwitch(MagicEntity, SwitchEntity, RestoreEntity):
def __init__(self, hass, area):
"""Initialize the area light control switch."""
Expand All @@ -65,11 +54,7 @@ def __init__(self, hass, area):
@property
def is_on(self):
"""Return true if the area is occupied."""
<<<<<<< HEAD
return (self._state == STATE_ON)
=======
return self._state == STATE_ON
>>>>>>> cb498d3def8a9ba35d45eadd5009c8f514f16a82

@property
def icon(self):
Expand Down Expand Up @@ -98,10 +83,7 @@ def turn_on(self, **kwargs):
"""Turn on presence hold."""
self._state = STATE_ON
self.schedule_update_ha_state()
<<<<<<< HEAD
=======

>>>>>>> cb498d3def8a9ba35d45eadd5009c8f514f16a82

class AreaPresenceHoldSwitch(MagicEntity, SwitchEntity, RestoreEntity):
def __init__(self, hass, area):
Expand All @@ -124,11 +106,7 @@ def __init__(self, hass, area):
@property
def is_on(self):
"""Return true if the area is occupied."""
<<<<<<< HEAD
return (self._state == STATE_ON)
=======
return self._state == STATE_ON
>>>>>>> cb498d3def8a9ba35d45eadd5009c8f514f16a82

@property
def icon(self):
Expand Down

0 comments on commit c88f7da

Please sign in to comment.