bhennink
(Bert Hennink)
March 4, 2023, 11:03am
1
Hi I have a KaKu switch and switch buttons in use.
I use that button to swict on my bedroomligts in friendly light mode.
now I try to create an automation where I can push that buton twice within some timeout to set the light bright.
So I created a trigger on the button for on.
Then 100ms delay
and then I wait for on again from unknown switchstate for 10 seconds
then in the trace I get:
Automation "stopped because only a single execution
pressing on , off, on
And I get the same error
When doing only on and off the automation wil continue without error, so it seems the 2nd wait for on is the guilty part. ??
is there any solution to this??
.
tom_l
March 4, 2023, 11:46am
2
Share your attempted automation config.
bhennink
(Bert Hennink)
March 5, 2023, 2:38pm
3
Hi I tried this one:
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- wait_for_trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
timeout:
hours: 0
minutes: 1
seconds: 10
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
- stop: ""
mode: single
And also tried this:
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- wait_for_trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "Off"
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
timeout:
hours: 0
minutes: 1
seconds: 10
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
- stop: ""
mode: single
tom_l
March 5, 2023, 3:59pm
4
This seems like a bug to me.
Even though you are waiting for the same trigger that triggers the automation, you are running the automation in single mode so re-triggering should be ignored while the automation is running. Instead the automation is being stopped.
You can report it as a new issue here:
bhennink
(Bert Hennink)
March 5, 2023, 4:45pm
5
But would running the automotin work in e restart mode work? I think that would just start it al over again?
bhennink
(Bert Hennink)
March 6, 2023, 1:24pm
7
@tom_l Reporting the issue was useless the topic is closed right after I posted is and I am sent back to the forum. A bit disappointing I wrote to t @mib1185 That to my opinion this is a serious issue. But I doubt if they reopen it?
So my initial question stands. Any clue how to get sucht an automation running?
tom_l
March 6, 2023, 1:39pm
8
Can you post the closed issue link?
bhennink
(Bert Hennink)
March 6, 2023, 1:40pm
9
I now get a reply that i should create a feature request
opened 04:54PM - 05 Mar 23 UTC
closed 07:33PM - 05 Mar 23 UTC
question
feature-request
### The problem
Hi I have a KaKu switch and switch buttons in use.
I use that … button to swict on my bedroomligts in friendly light mode.
now I try to create an automation where I can push that buton twice within some timeout to set the light bright.
So I created a trigger on the button for on.
Then 100ms delay
and then I wait for on again from unknown switchstate for 10 seconds
then in the trace I get:
Automation "stopped because only a single execution
pressing on , off, on
And I get the same error
When doing only on and off the automation wil continue without error, so it seems the 2nd wait for on is the guilty part. ??
I tried a few solution:
### What version of Home Assistant Core has the issue?
Operating System 9.5
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
MQTT with RFXcom
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- wait_for_trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
timeout:
hours: 0
minutes: 1
seconds: 10
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
- stop: ""
mode: single
And also tried this:
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- wait_for_trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "Off"
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
timeout:
hours: 0
minutes: 1
seconds: 10
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
- stop: ""
mode: single
```
### Anything in the logs that might be useful for us?
_No response_
### Additional information
_No response_
tom_l
March 6, 2023, 1:50pm
10
Your issue was poorly explained. I have added a comment. Lets see what happens.
tom_l
March 6, 2023, 1:55pm
11
One more thing to try. Remove the stop
action at the end of the actions. It does nothing as it is the end of the actions anyway. Also add continue_on_timeout: false
.
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- wait_for_trigger:
- platform: device
device_id: 5ab7588692eda8af22cdba3ed5ace7f9
domain: rfxtrx
type: command
subtype: "On"
timeout:
hours: 0
minutes: 1
seconds: 10
milliseconds: 0
enabled: true
continue_on_timeout: false
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
mode: single
Hellis81
(Hellis81)
March 6, 2023, 1:56pm
12
Could it be because it’s device?
What happens if you use event or whatever other possible solutions to trigger this
bhennink
(Bert Hennink)
March 6, 2023, 1:57pm
13
Thanks:)
I am just a user not a SW develloper and not used to describe such a bug briefly
Your description is clear:)
bhennink
(Bert Hennink)
March 6, 2023, 2:05pm
15
I have no clue what else could do the doubleclick.
There must be a timeout to finish the “ait for the 2nd click”
Because a single click should just switch the ligt on without any further action.
I also tried this
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 871d35e5f69331803efcd124291a3ae2
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- condition: state
entity_id: switch.ac_0056fc3_10
state: "on"
for:
hours: 0
minutes: 1
seconds: 0
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
- stop: ""
mode: single
but this resulted in:
Triggered by the event ‘rfxtrx_event’ at 6 maart 2023 om 15:18:21
Confirm Slaapkamer Bed is on for 1:00
Aborted at 6 maart 2023 om 15:18:21 (runtime: 0.01 seconds)
I think because the switch action that is seen is an event and not a state
Hellis81
(Hellis81)
March 6, 2023, 2:15pm
16
Your logic is correct.
The issue I believe is the device platform.
It has issues and could be the reason.
Do you have a binary sensor for this switch? Or the switch itself as a entity?
Or is there an event? I don’t know what the device is so I’m just guessing here.
I posted pretty much the same automation as a solution yesterday, so the concept works.
Please remember to use the code block when posting yaml.
You need a wait for trigger to wait for the light to go off.
description: ""
mode: single
trigger:
- platform: state
entity_id:
- switch.master_bedroom_light
to: "on"
condition: []
action:
- wait_for_trigger:
- platform: state
entity_id:
- switch.master_bedroom_light
to: "off"
from: "on"
timeout:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
contin…
bhennink
(Bert Hennink)
March 6, 2023, 2:32pm
17
@Hellis81 The purpose of your code is a bit different you want probably only to switch the bedligh on and not the rest.
I tried something similar
alias: Slaapkamer dubbelklik is wit
description: ""
trigger:
- platform: device
device_id: 871d35e5f69331803efcd124291a3ae2
domain: rfxtrx
type: command
subtype: "On"
condition: []
action:
- wait_for_trigger:
- platform: device
device_id: 871d35e5f69331803efcd124291a3ae2
domain: rfxtrx
type: command
subtype: "Off"
timeout:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
continue_on_timeout: false
- wait_for_trigger:
- platform: device
device_id: 871d35e5f69331803efcd124291a3ae2
domain: rfxtrx
type: command
subtype: "On"
timeout:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
continue_on_timeout: false
- service: light.turn_on
data:
brightness: 255
target:
entity_id:
- light.milight_slaap_bovenspiegel
- light.milight_slaap_onderspiegel
- stop: ""
mode: single
~~~
But again I get this message:
Triggered by the event 'rfxtrx_event' at 6 maart 2023 om 15:25:59
Stopped because only a single execution is allowed at 6 maart 2023 om 15:25:59 (runtime: 0.00 seconds)
Hellis81
(Hellis81)
March 6, 2023, 2:37pm
18
Can you please try with something else than the device platform?
I really believe that is the cause of your issue.
So again:
bhennink
(Bert Hennink)
March 6, 2023, 2:49pm
19
@Hellis81 The device is a 'Klikaan-Klikuit" Switch that is used via RFXcom in HA.
I have no cue how to use anything else:S
Hellis81
(Hellis81)
March 6, 2023, 3:08pm
20
You can just open up the device in devices and integrations and have a look at what it exposes.
I have never heard of Klikaan-Klikuit or RFXcom so I don’t know what it exposes