Skip to content

Commit 4569d1d

Browse files
authored
Merge pull request #5 from sinricpro/2.0.0-dev
fix: TemperatureSensor
2 parents 58a9def + 926852c commit 4569d1d

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

sinricpro/sinricpro.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -482,52 +482,52 @@ def _add_device_event_callbacks(self):
482482
for device in self.devices:
483483
if isinstance(device, PowerStateController):
484484
device.set_send_power_state_event_callback(self._send_power_state_event_callback)
485-
elif isinstance(device, PowerLevelController):
485+
if isinstance(device, PowerLevelController):
486486
device.set_send_power_level_event_callback(self._send_power_level_callback)
487-
elif isinstance(device, BrightnessController):
487+
if isinstance(device, BrightnessController):
488488
device.set_send_brightness_event_callback(self._send_brightness_event_callback)
489-
elif isinstance(device, ChannelController):
489+
if isinstance(device, ChannelController):
490490
device.set_send_change_channel_event_callback(self._send_change_channel_event_callback)
491-
elif isinstance(device, ColorController):
491+
if isinstance(device, ColorController):
492492
device.set_send_color_event_callback(self._send_color_event_callback)
493-
elif isinstance(device, ColorTemperatureController):
493+
if isinstance(device, ColorTemperatureController):
494494
device.send_color_temperature_event_callback(self._send_color_temperature_event_callback)
495-
elif isinstance(device, ContactSensor):
495+
if isinstance(device, ContactSensor):
496496
device.set_send_contact_event_callback(self._send_contact_event_callback)
497-
elif isinstance(device, DoorController):
497+
if isinstance(device, DoorController):
498498
device.set_send_door_state_event_callback(self._send_door_state_event_callback)
499-
elif isinstance(device, Doorbell):
499+
if isinstance(device, Doorbell):
500500
device.set_send_doorbell_event_callback(self._send_doorbell_event_callback)
501-
elif isinstance(device, EqualizerController):
501+
if isinstance(device, EqualizerController):
502502
device.set_send_bands_event_callback(self._send_bands_event_callback)
503-
elif isinstance(device, InputController):
503+
if isinstance(device, InputController):
504504
device.set_send_select_input_event_callback(self._send_select_input_event_callback)
505-
elif isinstance(device, LockController):
505+
if isinstance(device, LockController):
506506
device.set_send_lock_state_event_callback(self._send_lock_state_event_callback)
507-
elif isinstance(device, MediaController):
507+
if isinstance(device, MediaController):
508508
device.set_send_media_control_event_callback(self._send_media_control_event_callback)
509-
elif isinstance(device, ModeController):
509+
if isinstance(device, ModeController):
510510
device.set_send_mode_event_callback(self._send_mode_event_callback)
511-
elif isinstance(device, MotionSensor):
511+
if isinstance(device, MotionSensor):
512512
device.set_send_motion_event_callback(self._send_motion_event_callback)
513-
elif isinstance(device, MuteController):
513+
if isinstance(device, MuteController):
514514
device.set_send_mute_event_callback(self._send_mute_event_callback)
515-
elif isinstance(device, PercentageController):
515+
if isinstance(device, PercentageController):
516516
device.set_send_set_percentage_event_callback(self._set_percentage_event_callback)
517-
elif isinstance(device, PowerSensor):
517+
if isinstance(device, PowerSensor):
518518
device.set_send_power_sensor_event_callback(self._send_power_sensor_event_callback)
519-
elif isinstance(device, PushNotificationController):
519+
if isinstance(device, PushNotificationController):
520520
device.set_send_push_notification_event_callback(self._send_push_notification_event_callback)
521-
elif isinstance(device, RangeController):
521+
if isinstance(device, RangeController):
522522
device.set_send_range_value_event_callback(self._send_range_value_event_callback)
523-
elif isinstance(device, TemperatureSensor):
523+
if isinstance(device, TemperatureSensor):
524524
device.set_send_temperature_event_callback(self._send_temperature_event_callback)
525-
elif isinstance(device, ThermostatController):
525+
if isinstance(device, ThermostatController):
526526
device.set_send_thermostat_mode_event_callback(self._send_thermostat_mode_event_callback)
527527
device.set_send_target_temperature_event_callback(self._send_target_temperature_event_callback)
528-
elif isinstance(device, ToggleController):
528+
if isinstance(device, ToggleController):
529529
device.set_send_toggle_state_event_callback(self._send_toggle_state_event_callback)
530-
elif isinstance(device, VolumeController):
530+
if isinstance(device, VolumeController):
531531
device.set_send_volume_event(self._send_volume_event_callback)
532532

533533
def start(self, app_key, app_secret,*, server_url = "ws://ws.sinric.pro:80", restore_device_states = False, enable_log=False,) -> None:

0 commit comments

Comments
 (0)