@dbrunt
First I’ll apologize for two things…
The first is for tagging you directly but you seem to be the most likely person to help me based on your recent posting history here.
Second is that I’ll apologize for the questions I’ll ask and for how possibly complex this might be.
so on to my issue…
I’ve been using this integration for a while and haven’t really had any problems.
I saw your discussion above about the “ResponseNumeric” and it provided a possible means to do something I’ve been recently wanting to figure out how to do. Namely I want to be able to tell Alexa to set my phone alarm to a variable based on my voice input.
I previously had this set up to just set the phone to a pre-defined value set up thru an input_datetime (I’ll call it ) and that worked as expected. I even had the actionable notifications set so that it only set the alarm after a confirmation question.
All of that worked.
Then I added the “ResponseNumeric” into the mix and just can’t seem to get it working. I’ve been trying for a couple of days and I can’t see where I’m going wrong.
I’ll start out with some pseudo-code based on my (much longer) real code and I’ll indicate what works and where it’s failing.
- alias: Alarm Ask to Set Manually
action:
- if: sensor.my_mobile_app_next_alarm != "unavailable"
then: "There is already an alarm set on your phone" => STOP # <-- this step works
else: actionable_notification_alarm_set => "Would you like me to set your alarm for...<currently set value>?" # <-- this step works
possible responses:
ResponseYes
ResponseNone
ResponseNo
- alias: Alarm Set From Response
event_id: actionable_notification_alarm_set
action:
choose:
- "ResponseYes" => "OK, your alarm has been set to ...<currently set value>" => STOP # <-- this step works
- "ResponseNone" => "OK, your alarm has been set to ...<currently set value>" => STOP # <-- this step works
- "ResponseNo" => actionable_notification_alarm_set_time_variable => "Would you like me to set your alarm for a different time?" # <-- this step works
possible responses:
ResponseNo
ResponseNone
ResponseYes
- alias: Alarm Set Variable Time From Response
event_id: actionable_notification_alarm_set_time_variable
action:
choose:
- "ResponseNo" => "OK, no alarm has been set" => STOP # <-- this step works
- "ResponseNone" => "OK, no alarm has been set" => STOP # <-- this step works
- "ResponseYes" => actionable_notification_alarm_set_time_for => "What time would you like it set for?" # <-- this step works
possible responses:
ResponseNumeric
ResponseNone
## this is where it breaks down
- alias: Alarm Change Time Set From Response
event_id: actionable_notification_alarm_set_time_for
action:
choose:
- "ResponseNumeric" => set_datetime to...<numeric reponse> => "OK, your alarm has been set to...<numeric response>" => STOP
- "ResponseNone" => "OK, no alarm has been set" => STOP
When Alexa asks “What time would you like it set for?” the echo device stops listening (indicated by the light ring turning off).
No matter what the response is that I provide nothing happens (sort of…)
BUT…If I wait a bit (even up two or three minutes) and I start the sequence again (“Alexa, set the alarm on my phone”) the device starts to make its first question (“Would you like me to set your alarm for…?”) but it gets interrupted part way thru by the device saying “OK, no alarm has been set” followed by my phone alarm getting set to the then the device telling me that my alarm has been set (" OK, your alarm has been set to …").
Obviously there should be no other steps of setting the alarm until it registers the numeric response.
and it shouldn’t tell me no alarm is set at the end unless it receives a ResponseNone. But there are no responses registered at all after that.
And it definitely shouldn’t do both. (say no alarm is set and then set an alarm at the same time)
Then everything resets and I can again go thru the above sequences. At least till I get to the part that it asks what time I want the alarm set for. Then the same thing happens.
I’m really at a loss.
It almost seems as if there is only a certain number of chained actionable notifications the system can process before it gets lost.
watching the actionable notification events I see that everything gets registered correctly until the question about “what time?” then everything stops.
I’ll post the code but I knew this was already a really info heavy post and I didn’t want to add any more to it.
Anyone have any insight into this?
Code to follow…