**UPDATE: Updated PR to now also include hold/release for color_temp. No. 5 belo…w**
This is an attempt to enhance PR #822. Currently, it only maps generic actions to the buttons (i.e. 'button_1','button_2', etc). It should align with the actions/clicks corresponding to what's listed on the remote **(power on/off, brightness up/down/hold/release, color_temp up/down, recall command sequence)**. This will also provide easier integration into various automation platforms (HA/Mozilla)
The following is the new behavior:
1.) `button_1` -> `click: power_(on|off)`
2.) `button_2` -> `action: brightness_(up|down)` (`brightness` value is also provided)
3.) `button_2` **(hold/release)** -> `brightness_(up|down)_(hold|release)` (**NEW FEATURE**)
4.) `button_3` -> `click: color_temp_(up|down)` (`color temp` value is also provided)
5.) `button_3` **(hold/release)** -> `color_temp_(up|down)_(hold|release)` (**NEW FEATURE**)
6.) `button_4` -> `action: action_recall` (since this is a two part command brightness/color, it will combine into one payload with `brightness` and `color_temp`)
### Power On/Off
```json
{"brightness":254,"color_temp":153,"click":"power_off"}
{"brightness":254,"color_temp":153,"click":"power_on"}
```
### Brightness Up/Down (brightness increments/decrements in both direction rather than cycling from the beginning)
```json
{"brightness":191,"color_temp":153,"click":"brightness_down","transition_time":0.3}
{"brightness":127,"color_temp":153,"click":"brightness_down","transition_time":0.3}
{"brightness":64,"color_temp":153,"click":"brightness_down","transition_time":0.3}
{"brightness":13,"color_temp":153,"click":"brightness_down","transition_time":0.3}
-- Then starts to increment
{"brightness":64,"color_temp":153,"click":"brightness_up","transition_time":0.3}
{"brightness":127,"color_temp":153,"click":"brightness_up","transition_time":0.3}
{"brightness":191,"color_temp":153,"click":"brightness_up","transition_time":0.3}
{"brightness":254,"color_temp":153,"click":"brightness_up","transition_time":0.3}
{"brightness":191,"color_temp":153,"click":"brightness_down","transition_time":0.3}
```
### Brightness hold/release
```json
{"brightness":191,"color_temp":153,"action":"brightness_down_hold"}
{"brightness":191,"color_temp":153,"action":"brightness_down_release"}
{"brightness":191,"color_temp":153,"action":"brightness_down_hold"}
{"brightness":191,"color_temp":153,"action":"brightness_down_release"}
```
### Color Temp Up/Down (same logic as brightness up/down)
```json
{"brightness":191,"color_temp":181,"transition_time":0.3,"click":"color_temp_down"}
{"brightness":191,"color_temp":222,"transition_time":0.3,"click":"color_temp_up"}
{"brightness":191,"color_temp":285,"transition_time":0.3,"click":"color_temp_up"}
{"brightness":191,"color_temp":370,"transition_time":0.3,"click":"color_temp_up"}
{"brightness":191,"color_temp":285,"transition_time":0.3,"click":"color_temp_down"}
{"brightness":191,"color_temp":222,"transition_time":0.3,"click":"color_temp_down"}
{"brightness":191,"color_temp":181,"transition_time":0.3,"click":"color_temp_down"}
{"brightness":191,"color_temp":153,"transition_time":0.3,"click":"color_temp_down"}
{"brightness":191,"color_temp":181,"transition_time":0.3,"click":"color_temp_up"}
```
### Recalling from 3 brightness+color_temp settings (Remote stores 3)
```json
{"brightness":13,"color_temp":222,"transition_time":0.3,"action":"action_recall"}
{"brightness":143,"color_temp":222,"transition_time":0.3,"action":"action_recall"}
{"brightness":254,"color_temp":153,"transition_time":0.3,"action":"action_recall"}
{"brightness":13,"color_temp":222,"transition_time":0.3,"action":"action_recall"}
```
NOTE: There were some cosmetic changes as well to functions to make it more readable, and corrected the manufacturer name. This remote is made by Leedarson vs. Ecosmart (Home Depot). It's just bundled in the same box.