Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last_called is too slow? #83

Closed
matbrewer396 opened this issue Feb 22, 2019 · 8 comments · Fixed by #105
Closed

last_called is too slow? #83

matbrewer396 opened this issue Feb 22, 2019 · 8 comments · Fixed by #105
Labels
enhancement New feature or request

Comments

@matbrewer396
Copy link

Hi

I'm trying to make of the last_called attribute. Ie things like "Alexa Turn On Lights" / "Alexa Turn On TV" and then based on the echo that was used turn on the lights for that room.

This #65 suggest that @brianhanifin got it working. But in my test there a good 10 seconds delay until the correct echo is reported back correctly.

Is there any way to force a refresh of the last_called attribute?

Cheers

@alandtse
Copy link
Owner

Not at this time. We will be exposing a service in the future as the current polling method results in too much polling of Alexa servers.

@alandtse alandtse added the enhancement New feature or request label Feb 23, 2019
@matbrewer396
Copy link
Author

Yes that would be a much better option

@alandtse
Copy link
Owner

FYI, the Alexa App already allows you to do location specific control of at least lights. You'll need to use HA's emulated Hue and ensure within the AlexaApp it treats that switch as a light. I think you could also do the TV too, but I haven't tested it.

@matbrewer396
Copy link
Author

Really, how? I've not seen this option before, do you mean via a routine?

There only the option "Alexa will respond from" which give device specific controls

@alandtse
Copy link
Owner

@matbrewer396
Copy link
Author

Nice that works thank for help

@h4nc
Copy link

h4nc commented Feb 25, 2019

@alandtse I'd like to use the last_called sensor for the following case. Unfortunately as the topic says currently it's too slow.

I like to turn on an input boolean with a routine in alexa by my voice. This than will trigger an automation which sends a tts to the last_called alexa. This way it must be fast or it will send the tts to wrong alexa.
Will this be possible with the service you are planning to implement in future. Will the service be part of the component we already use?

EDIT: my sensor.last_alexa only updates it's state after I restart home assistant. currently all of my alexa devices show last_called: true. As I understood only one device can have that state true?
EDIT2: After restarting only one device has the true flag.

@alandtse
Copy link
Owner

This branch has an exposed service for the adventurous who want to test it.

alexa_media.update_last_called service can take no args or can specify specific accounts to find the last_called for.

{
  "email" : ["email1", "email2"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants