Python LimitlessLED via RF

Diff
Login

Diff

Differences From Artifact [2e6795b5a2]:

To Artifact [0e252d2773]:


14
15
16
17
18
19
20

21
22
23
24
25
26
27
			'channels': [9, 40, 71],
			'syncword': [0x258B, 0x147A],
			'zones': [1, 2, 3, 4],
			'features': [
				'can_set_brightness',
				'has_brightness',
				'has_white',

				'has_color'
			],
			'brightness_range': [0, 25],
			'button_map': {
				'slider':     0x00,
				'on':         0x01,
				'white':      0x11,







>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
			'channels': [9, 40, 71],
			'syncword': [0x258B, 0x147A],
			'zones': [1, 2, 3, 4],
			'features': [
				'can_set_brightness',
				'has_brightness',
				'has_white',
				'has_night',
				'has_color'
			],
			'brightness_range': [0, 25],
			'button_map': {
				'slider':     0x00,
				'on':         0x01,
				'white':      0x11,
59
60
61
62
63
64
65

66
67
68
69
70
71
72
			'temperature_output_range': [0, 9],
			'temperature_input_range':  [6500, 3000],
			'zones': [1, 2, 3, 4],
			'features': [
				'has_max_brightness',
				'has_brightness',
				'has_temperature',

				'is_white'
			],
			'button_map': {
				'on':         0x05,
				'off':        0x09,
				'max':        0x15,
				'night':      0x19,







>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
			'temperature_output_range': [0, 9],
			'temperature_input_range':  [6500, 3000],
			'zones': [1, 2, 3, 4],
			'features': [
				'has_max_brightness',
				'has_brightness',
				'has_temperature',
				'has_night',
				'is_white'
			],
			'button_map': {
				'on':         0x05,
				'off':        0x09,
				'max':        0x15,
				'night':      0x19,
734
735
736
737
738
739
740














741
742
743
744
745
746
747
		# that these important messages are delivered
		if try_hard:
			message['retries'] = self._config['retries'] * 2
			message['delay'] = self._config['delay'] * 2

		return self._send_button(message)















	def white(self, zone = None):
		# If the bulbs are already white, nothing needs to be done
		if 'is_white' in self._config['features']:
			return True

		# If the bulbs do not support white, nothing needs to be done
		if 'has_white' not in self._config['features']:







>
>
>
>
>
>
>
>
>
>
>
>
>
>







736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
		# that these important messages are delivered
		if try_hard:
			message['retries'] = self._config['retries'] * 2
			message['delay'] = self._config['delay'] * 2

		return self._send_button(message)

	def night(self, zone = None):
		# If the bulbs do not support night, nothing needs to be done
		if 'has_night' not in self._config['features']:
			return False

		if zone is None:
			message = {'button': 'night'}
		else:
			message = {
				'button': 'zone_night',
				'zone': zone
			}
		return self._send_button(message)

	def white(self, zone = None):
		# If the bulbs are already white, nothing needs to be done
		if 'is_white' in self._config['features']:
			return True

		# If the bulbs do not support white, nothing needs to be done
		if 'has_white' not in self._config['features']: