From f006b00dc1a308b850e4e2a75583201ce50e3207 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 16 Nov 2016 08:26:29 -0800 Subject: [PATCH] Fix spelling schedule_update_ha_state (#4415) --- homeassistant/components/switch/command_line.py | 4 ++-- homeassistant/components/switch/demo.py | 4 ++-- homeassistant/components/switch/enocean.py | 2 +- homeassistant/components/switch/flux.py | 4 ++-- homeassistant/components/switch/knx.py | 4 ++-- homeassistant/components/switch/mqtt.py | 4 ++-- homeassistant/components/switch/mysensors.py | 8 ++++---- homeassistant/components/switch/netio.py | 2 +- homeassistant/components/switch/pilight.py | 4 ++-- homeassistant/components/switch/pulseaudio_loopback.py | 4 ++-- homeassistant/components/switch/rpi_gpio.py | 4 ++-- homeassistant/components/switch/scsgate.py | 4 ++-- homeassistant/components/switch/vera.py | 4 ++-- homeassistant/components/switch/wemo.py | 4 ++-- homeassistant/helpers/entity.py | 2 +- 15 files changed, 29 insertions(+), 29 deletions(-) diff --git a/homeassistant/components/switch/command_line.py b/homeassistant/components/switch/command_line.py index 0fe804d71a3..eca8f8b6023 100644 --- a/homeassistant/components/switch/command_line.py +++ b/homeassistant/components/switch/command_line.py @@ -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() diff --git a/homeassistant/components/switch/demo.py b/homeassistant/components/switch/demo.py index bc5e90cefb4..359fc89353d 100644 --- a/homeassistant/components/switch/demo.py +++ b/homeassistant/components/switch/demo.py @@ -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() diff --git a/homeassistant/components/switch/enocean.py b/homeassistant/components/switch/enocean.py index 84c126076e3..71bd180ad10 100644 --- a/homeassistant/components/switch/enocean.py +++ b/homeassistant/components/switch/enocean.py @@ -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() diff --git a/homeassistant/components/switch/flux.py b/homeassistant/components/switch/flux.py index a781d72fa77..9fccf75ea4f 100644 --- a/homeassistant/components/switch/flux.py +++ b/homeassistant/components/switch/flux.py @@ -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.""" diff --git a/homeassistant/components/switch/knx.py b/homeassistant/components/switch/knx.py index 1e02fd35844..5141e26cdf3 100644 --- a/homeassistant/components/switch/knx.py +++ b/homeassistant/components/switch/knx.py @@ -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() diff --git a/homeassistant/components/switch/mqtt.py b/homeassistant/components/switch/mqtt.py index 76ba9bf28bc..794a0f0ced3 100644 --- a/homeassistant/components/switch/mqtt.py +++ b/homeassistant/components/switch/mqtt.py @@ -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() diff --git a/homeassistant/components/switch/mysensors.py b/homeassistant/components/switch/mysensors.py index 04282a4fa66..d6b348d8274 100644 --- a/homeassistant/components/switch/mysensors.py +++ b/homeassistant/components/switch/mysensors.py @@ -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.""" diff --git a/homeassistant/components/switch/netio.py b/homeassistant/components/switch/netio.py index 151a1001e38..74505cdcdc2 100644 --- a/homeassistant/components/switch/netio.py +++ b/homeassistant/components/switch/netio.py @@ -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): diff --git a/homeassistant/components/switch/pilight.py b/homeassistant/components/switch/pilight.py index 2f0e81c753d..6e16c9fa2e5 100644 --- a/homeassistant/components/switch/pilight.py +++ b/homeassistant/components/switch/pilight.py @@ -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() diff --git a/homeassistant/components/switch/pulseaudio_loopback.py b/homeassistant/components/switch/pulseaudio_loopback.py index b8584ab232b..46f9173437c 100644 --- a/homeassistant/components/switch/pulseaudio_loopback.py +++ b/homeassistant/components/switch/pulseaudio_loopback.py @@ -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) diff --git a/homeassistant/components/switch/rpi_gpio.py b/homeassistant/components/switch/rpi_gpio.py index a08e6f86242..cc761250be4 100644 --- a/homeassistant/components/switch/rpi_gpio.py +++ b/homeassistant/components/switch/rpi_gpio.py @@ -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() diff --git a/homeassistant/components/switch/scsgate.py b/homeassistant/components/switch/scsgate.py index 551704d032f..d7670dff067 100644 --- a/homeassistant/components/switch/scsgate.py +++ b/homeassistant/components/switch/scsgate.py @@ -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.""" diff --git a/homeassistant/components/switch/vera.py b/homeassistant/components/switch/vera.py index 21d386ddadb..8ab66b75fff 100644 --- a/homeassistant/components/switch/vera.py +++ b/homeassistant/components/switch/vera.py @@ -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): diff --git a/homeassistant/components/switch/wemo.py b/homeassistant/components/switch/wemo.py index 986d443fa37..d4f6b721e9d 100644 --- a/homeassistant/components/switch/wemo.py +++ b/homeassistant/components/switch/wemo.py @@ -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.""" diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 8556d028062..b707f2f7199 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -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.