-
Notifications
You must be signed in to change notification settings - Fork 70
Remote needs a "standby" state #85
Comments
Did you solve this? My situation is that I have a motion sensor that triggers me entering the room and turns on the lights. But when I want to leave and don't want to wait for the motion timeout I want to press the TAP. This only works once, because the second time I do this the TAP is already in that 1_click state and does not fire again. In the past I had used a rest trigger that set the state after 1 second to idle again based on the update_time. Now it works confusing. |
@johansmitsnl which version of the component do you use? Could you please show the state of the sensor straight from the API before and after clicking the TAP. In 1.0 I've changed the sensor behaviour, so it only updates the sensor state if the API state changed. AFAIK this means you could create an automation that triggers only on |
@yottatsa here some details: First click {
"state": {
"buttonevent": 34,
"lastupdated": "2019-01-28T11:31:36"
},
"swupdate": {
"state": "notupdatable",
"lastinstall": null
},
"config": {
"on": true
},
"name": "Hue TAP Badkamer",
"type": "ZGPSwitch",
"modelid": "ZGPSWITCH",
"manufacturername": "Philips",
"productname": "Hue tap switch",
"uniqueid": "00:00:00:00:00:46:69:d2-f2",
"capabilities": {
"certified": true
}
} Second same button: {
"state": {
"buttonevent": 34,
"lastupdated": "2019-01-28T11:32:13"
},
"swupdate": {
"state": "notupdatable",
"lastinstall": null
},
"config": {
"on": true
},
"name": "Hue TAP Badkamer",
"type": "ZGPSwitch",
"modelid": "ZGPSWITCH",
"manufacturername": "Philips",
"productname": "Hue tap switch",
"uniqueid": "00:00:00:00:00:46:69:d2-f2",
"capabilities": {
"certified": true
}
} My automation is like this: - alias: Lights ON
trigger:
- platform: state
entity_id: sensor.hue_tap_badkamer
to: '1_click' This goes the same for the other HUE dimmer remotes when I only trigger on the I use master (6a4b711) |
Any updates for this? I do use it correctly or is there another way to trigger on this state? |
Found it. Because the state doesn't change between presses, and the only change is in attributes, you need to use bit different way to trigger:
With this, every event with There's also a bug #55, when the remote is triggering by itself if the attributes are changed. Proposed fix will reset the state to |
The better way to fix it is to emit an event instead of state change. |
What I have been doing is kind of a dirty hack, but I have not had any issues with false triggers and it seems to be working very well. Ever since the custom component gained the ability to manually set the state (1.0.3, I think) I have been issuing a rest command to manually change the state to # rest_commands.yaml
#################
hue_remote_standby:
url: http://localhost:8123/api/states/sensor.hue_remote
method: POST
headers:
authorization: !secret hue_remote_standby
payload: '{"state": "standby"}'
content_type: application/json
# secrets.yaml
##########
hue_remote_standby: Bearer ABCDEFGH |
@yottatsa You proposed change will work but I have several automations combined some some states. Having a stand-by state looks like a muts if you don't want to do stange state management with bools. Expanded your example: - alias: Lights ON
trigger:
- platform: state
entity_id: sensor.hue_tap_badkamer
- platform: state
entity_id: sensor.hue_tap_bedroom
condition:
condition: or
conditions:
- condition: state
entity_id: sensor.hue_tap_badkamer
state: '1_hold_up'
- condition: state
entity_id: sensor.hue_tap_bedroom
state: '1_hold_up' |
Any update on this or a testing branch? |
Im using node-red to control my dimmers. Using the RBE component "The node blocks unless the incoming value changes" and looking at the last_updated attribute. Maybe it´s possible to implement that in homeassistant directly. |
Any new about the standby idea? I can click to turn on the light, but can not click again to turn it off, since the state of |
Per https://www.home-assistant.io/docs/automation/trigger/#state-trigger
So it doesn't matter if the state doesn't change, you just need to make sure you don't include |
Please summarise and reopen on remotes repo if still of interest |
The remote control works great but really needs one of two things to make it perfect.
Either:
A) a default state that the remote can return to after the click/hold event has been processed (return to "standby" after some period of time)
or
B) faster click recognition (it is difficult to get a second click on the same button to register and not have it think I'm trying to do a 'hold')
The text was updated successfully, but these errors were encountered: