Fix spelling schedule_update_ha_state (#4415)

pull/4438/head
Paulus Schoutsen 2016-11-16 08:26:29 -08:00 committed by GitHub
parent 1fff6ce438
commit f006b00dc1
15 changed files with 29 additions and 29 deletions

View File

@ -149,11 +149,11 @@ class CommandSwitch(SwitchDevice):
if (CommandSwitch._switch(self._command_on) and
not self._command_state):
self._state = True
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the device off."""
if (CommandSwitch._switch(self._command_off) and
not self._command_state):
self._state = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -66,9 +66,9 @@ class DemoSwitch(SwitchDevice):
def turn_on(self, **kwargs):
"""Turn the switch on."""
self._state = True
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the device off."""
self._state = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -79,4 +79,4 @@ class EnOceanSwitch(enocean.EnOceanDevice, ToggleEntity):
def value_changed(self, val):
"""Update the internal state of the switch."""
self._on_state = val
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -137,7 +137,7 @@ class FluxSwitch(SwitchDevice):
self._state = True
self.unsub_tracker = track_utc_time_change(self.hass, self.flux_update,
second=[0, 30])
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn off flux."""
@ -146,7 +146,7 @@ class FluxSwitch(SwitchDevice):
self.unsub_tracker = None
self._state = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def flux_update(self, now=None):
"""Update all the lights using flux."""

View File

@ -40,7 +40,7 @@ class KNXSwitch(KNXGroupAddress, SwitchDevice):
self.group_write(1)
self._state = [1]
if not self.should_poll:
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the switch off.
@ -50,4 +50,4 @@ class KNXSwitch(KNXGroupAddress, SwitchDevice):
self.group_write(0)
self._state = [0]
if not self.should_poll:
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -117,7 +117,7 @@ class MqttSwitch(SwitchDevice):
if self._optimistic:
# Optimistically assume that switch has changed state.
self._state = True
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the device off."""
@ -126,4 +126,4 @@ class MqttSwitch(SwitchDevice):
if self._optimistic:
# Optimistically assume that switch has changed state.
self._state = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -137,7 +137,7 @@ class MySensorsSwitch(mysensors.MySensorsDeviceEntity, SwitchDevice):
if self.gateway.optimistic:
# optimistically assume that switch has changed state
self._values[self.value_type] = STATE_ON
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self):
"""Turn the switch off."""
@ -146,7 +146,7 @@ class MySensorsSwitch(mysensors.MySensorsDeviceEntity, SwitchDevice):
if self.gateway.optimistic:
# optimistically assume that switch has changed state
self._values[self.value_type] = STATE_OFF
self.shedule_update_ha_state()
self.schedule_update_ha_state()
class MySensorsIRSwitch(MySensorsSwitch):
@ -182,7 +182,7 @@ class MySensorsIRSwitch(MySensorsSwitch):
# optimistically assume that switch has changed state
self._values[self.value_type] = self._ir_code
self._values[set_req.V_LIGHT] = STATE_ON
self.shedule_update_ha_state()
self.schedule_update_ha_state()
# turn off switch after switch was turned on
self.turn_off()
@ -198,7 +198,7 @@ class MySensorsIRSwitch(MySensorsSwitch):
if self.gateway.optimistic:
# optimistically assume that switch has changed state
self._values[set_req.V_LIGHT] = STATE_OFF
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def update(self):
"""Update the controller with the latest value from a sensor."""

View File

@ -156,7 +156,7 @@ class NetioSwitch(SwitchDevice):
val[self.outlet - 1] = '1' if value else '0'
self.netio.get('port list %s' % ''.join(val))
self.netio.states[self.outlet - 1] = value
self.shedule_update_ha_state()
self.schedule_update_ha_state()
@property
def is_on(self):

View File

@ -127,11 +127,11 @@ class PilightSwitch(SwitchDevice):
self._hass.services.call(pilight.DOMAIN, pilight.SERVICE_NAME,
self._code_on, blocking=True)
self._state = True
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self):
"""Turn the switch on by calling pilight.send service with off code."""
self._hass.services.call(pilight.DOMAIN, pilight.SERVICE_NAME,
self._code_off, blocking=True)
self._state = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -170,7 +170,7 @@ class PALoopbackSwitch(SwitchDevice):
self._pa_svr.update_module_state(no_throttle=True)
self._module_idx = self._pa_svr.get_module_idx(
self._sink_name, self._source_name)
self.shedule_update_ha_state()
self.schedule_update_ha_state()
else:
_LOGGER.warning(IGNORED_SWITCH_WARN)
@ -181,7 +181,7 @@ class PALoopbackSwitch(SwitchDevice):
self._pa_svr.update_module_state(no_throttle=True)
self._module_idx = self._pa_svr.get_module_idx(
self._sink_name, self._source_name)
self.shedule_update_ha_state()
self.schedule_update_ha_state()
else:
_LOGGER.warning(IGNORED_SWITCH_WARN)

View File

@ -77,10 +77,10 @@ class RPiGPIOSwitch(ToggleEntity):
"""Turn the device on."""
rpi_gpio.write_output(self._port, 0 if self._invert_logic else 1)
self._state = True
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self):
"""Turn the device off."""
rpi_gpio.write_output(self._port, 1 if self._invert_logic else 0)
self._state = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()

View File

@ -119,7 +119,7 @@ class SCSGateSwitch(SwitchDevice):
ToggleStatusTask(target=self._scs_id, toggled=True))
self._toggled = True
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the device off."""
@ -129,7 +129,7 @@ class SCSGateSwitch(SwitchDevice):
ToggleStatusTask(target=self._scs_id, toggled=False))
self._toggled = False
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def process_event(self, message):
"""Handle a SCSGate message related with this switch."""

View File

@ -36,13 +36,13 @@ class VeraSwitch(VeraDevice, SwitchDevice):
"""Turn device on."""
self.vera_device.switch_on()
self._state = STATE_ON
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn device off."""
self.vera_device.switch_off()
self._state = STATE_OFF
self.shedule_update_ha_state()
self.schedule_update_ha_state()
@property
def current_power_mwh(self):

View File

@ -151,13 +151,13 @@ class WemoSwitch(SwitchDevice):
"""Turn the switch on."""
self._state = WEMO_ON
self.wemo.on()
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def turn_off(self):
"""Turn the switch off."""
self._state = WEMO_OFF
self.wemo.off()
self.shedule_update_ha_state()
self.schedule_update_ha_state()
def update(self):
"""Update WeMo state."""

View File

@ -270,7 +270,7 @@ class Entity(object):
self.hass.states.async_set(
self.entity_id, state, attr, self.force_update)
def shedule_update_ha_state(self, force_refresh=False):
def schedule_update_ha_state(self, force_refresh=False):
"""Shedule a update ha state change task.
That is only needed on executor to not block.