Python LimitlessLED via RF

Check-in [e8f1a31e09]
Login
Overview
Comment:Added support for night mode
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e8f1a31e09d2cf38d896980713528b2039ef24e595eba1ff4198258f1c8029ad
User & Date: rkeene on 2020-05-10 03:39:21
Other Links: manifest | tags
Context
2020-05-10
03:39
limitlessled_rf v0.13 check-in: fe013ba8dd user: rkeene tags: 0.13, trunk
03:39
Added support for night mode check-in: e8f1a31e09 user: rkeene tags: trunk
2020-05-09
21:44
limitlessled_rf v0.12 Fixed bug in getting zones check-in: 3ea3d5d796 user: rkeene tags: 0.12, trunk
Changes

Modified limitlessled_rf/__init__.py from [2e6795b5a2] to [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']: