DimmerBed: Add saturisation control

Other changes:

* Set mode 0 = ct, 1 = hue, 2 = sat
* on-long-* only change colors relatively for visual feedback
master
Adrian 2018-05-31 00:26:02 +02:00
parent e708ef69cf
commit 139c8002f2
10 changed files with 108 additions and 14 deletions

View File

@ -6,10 +6,10 @@ This may be the case in the bedroom.
The on and off buttons work as expected.
Pressing the on button longer toggles color and temperature mode.
Pressing the on button longer cycles temperature, color, and saturisation mode.
Pressing the brightness buttons change the brightness,
holding the brightness buttons change the color or temperature accordingly.
holding the brightness buttons change the temperature, color, and saturisation respectively.
## Devices

View File

@ -3,8 +3,8 @@
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "gt",
"value": "0"
"operator": "lt",
"value": "1"
},
{
"address": "/sensors/DIMMER/state/buttonevent",

View File

@ -3,7 +3,7 @@
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "lt",
"operator": "eq",
"value": "1"
},
{

View File

@ -0,0 +1,29 @@
{
"name": "BASENAME.dn-hold-sat",
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "gt",
"value": "1"
},
{
"address": "/sensors/DIMMER/state/buttonevent",
"operator": "eq",
"value": "3001"
},
{
"address": "/sensors/DIMMER/state/lastupdated",
"operator": "dx"
}
],
"actions": [
{
"address": "/groups/GROUP/action",
"method": "PUT",
"body": {
"transitiontime": 1,
"sat_inc": -25
}
}
]
}

View File

@ -4,7 +4,7 @@
{
"address": "/sensors/MEMORY/state/status",
"operator": "gt",
"value": "0"
"value": "1"
},
{
"address": "/sensors/DIMMER/state/buttonevent",
@ -21,9 +21,8 @@
"address": "/groups/GROUP/action",
"method": "PUT",
"body": {
"bri": 203,
"hue": 60000,
"sat": 240
"transitiontime": 1,
"ct_inc": 96
}
},
{

View File

@ -21,8 +21,9 @@
"address": "/groups/GROUP/action",
"method": "PUT",
"body": {
"bri": 203,
"ct": 357
"transitiontime": 1,
"hue_inc": 40000,
"sat_inc": 100
}
},
{

View File

@ -0,0 +1,36 @@
{
"name": "BASENAME.on-long-sat",
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "eq",
"value": "1"
},
{
"address": "/sensors/DIMMER/state/buttonevent",
"operator": "eq",
"value": "1003"
},
{
"address": "/sensors/DIMMER/state/lastupdated",
"operator": "dx"
}
],
"actions": [
{
"address": "/groups/GROUP/action",
"method": "PUT",
"body": {
"transitiontime": 1,
"sat_inc": -100
}
},
{
"address": "/sensors/MEMORY/state",
"method": "PUT",
"body": {
"status": 2
}
}
]
}

View File

@ -3,8 +3,8 @@
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "gt",
"value": "0"
"operator": "lt",
"value": "1"
},
{
"address": "/sensors/DIMMER/state/buttonevent",

View File

@ -3,7 +3,7 @@
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "lt",
"operator": "eq",
"value": "1"
},
{

View File

@ -0,0 +1,29 @@
{
"name": "BASENAME.up-hold-sat",
"conditions": [
{
"address": "/sensors/MEMORY/state/status",
"operator": "gt",
"value": "1"
},
{
"address": "/sensors/DIMMER/state/buttonevent",
"operator": "eq",
"value": "2001"
},
{
"address": "/sensors/DIMMER/state/lastupdated",
"operator": "dx"
}
],
"actions": [
{
"address": "/groups/GROUP/action",
"method": "PUT",
"body": {
"transitiontime": 1,
"sat_inc": 25
}
}
]
}