Python LimitlessLED via RF

Check-in [7dcbe06115]
Login
Overview
Comment:Really fixed temperature inversion
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7dcbe061154db1bf4d6d64157e042fca5716047bc519d44d42dda3d302163975
User & Date: rkeene on 2020-04-29 23:46:24
Other Links: manifest | tags
Context
2020-04-30
01:30
More temperature corrections check-in: ba7cf6d824 user: rkeene tags: trunk
2020-04-29
23:46
Really fixed temperature inversion check-in: 7dcbe06115 user: rkeene tags: trunk
23:31
Corrected color temperature inversion and max brightness bug check-in: 1e1bbc1d62 user: rkeene tags: trunk
Changes

Modified limitlessled_rf/__init__.py from [4061ad1db9] to [c4643c5d3b].

52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66







-
+







		'cct': {
			'retries':  10,
			'delay':    0.5,
			'channels': [4, 39, 74],
			'syncword': [0x55AA, 0x050A],
			'brightness_range': [0, 9],
			'temperature_output_range': [9, 0],
			'temperature_input_range':  [9000, 3000],
			'temperature_input_range':  [3000, 6500],
			'features': [
				'has_max_brightness',
				'has_brightness',
				'has_temperature',
				'is_white'
			],
			'button_map': {
602
603
604
605
606
607
608
609

610
611

612
613
614
615
616
617
618
602
603
604
605
606
607
608

609
610

611
612
613
614
615
616
617
618







-
+

-
+








		temperature_input_coldest = self._config['temperature_input_range'][0]
		temperature_input_warmest = self._config['temperature_input_range'][1]
		temperature_output_coldest = self._config['temperature_output_range'][0]
		temperature_output_warmest = self._config['temperature_output_range'][1]

		# Clamp the color temperature to something this remote supports
		if kelvins < temperature_input_warmest:
		if kelvins < min(temperature_input_warmest, temperature_input_coldest):
			kelvins = temperature_input_warmest
		elif kelvins > temperature_input_coldest:
		elif kelvins > max(temperature_input_coldest, temperature_input_warmest):
			kelvins = temperature_input_coldest

		temperature = self._scale_int(kelvins, temperature_input_coldest, temperature_input_warmest, temperature_output_coldest, temperature_output_warmest)
		self._debug("Scaled kelvins={} to a temperature value of {}".format(kelvins, temperature))

		if 'can_set_temperature' in self._config['features']:
			return self._set_temperature(temperature, zone)