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

[Enhancement] Support for Buttons #195

Closed
Silther opened this issue Nov 24, 2024 · 13 comments · Fixed by #309
Closed

[Enhancement] Support for Buttons #195

Silther opened this issue Nov 24, 2024 · 13 comments · Fixed by #309
Labels
feature Feature Request

Comments

@Silther
Copy link

Silther commented Nov 24, 2024

Please add support fur buttons.
I currently use the addon for starting an my home assistant dashboard cast to my google nest hub. Which works with input-booleans but buttons would be nicer

@t0bst4r
Copy link
Owner

t0bst4r commented Nov 27, 2024

Can you provide the attributes and state of an button entity?
(HA -> Dev Tools -> State -> Search for your button)

@t0bst4r t0bst4r changed the title Support for Buttons [Enhancement] Support for Buttons Nov 27, 2024
@Silther
Copy link
Author

Silther commented Nov 27, 2024

image

That?

@t0bst4r
Copy link
Owner

t0bst4r commented Nov 28, 2024

Okay, so buttons don't have an "on" or "off" state.
How would you suggest implementing them? I assume it's not a sensor device, because you want to press it from GH or alexa, right?

We could simulate an "on / off" unit, but we won't be able to determine an "on" or "off" state.

@Silther
Copy link
Author

Silther commented Nov 28, 2024

I should uploud a new photo as it has a state once you press the button, looks like a timestamp when it was pressed.

But isn't there already an official matter implementation?

@t0bst4r
Copy link
Owner

t0bst4r commented Nov 28, 2024

I should uploud a new photo as it has a state once you press the button, looks like a timestamp when it was pressed.

Yes i have tested this with a helper, too. No more screenshot needed.

But isn't there already an official matter implementation?

I couldn't find one. But maybe i'm just stupid 😀

@t0bst4r
Copy link
Owner

t0bst4r commented Nov 28, 2024

I need to correct myself. There is a device type for it in matter: Generic Switch

@jesusgcas
Copy link

This would be very useful to control IR devices. Thanks

@jesusvallejo
Copy link

Agree, i solved it with a switch that automatically turns itself off after 3 seconds, so effectively its a push button. Nevertheless it would be better to have a more correct implementation.

@t0bst4r
Copy link
Owner

t0bst4r commented Dec 15, 2024

I've had a look at generic Switch devices in matter in combination with Alexa.

It seems they are represented as a "remote control" in Alexa. And they cannot be triggered from Alexa. They can only be used to trigger an Alexa routine.

Therefore if you want to trigger an input button from alexa / GH etc. we need something different.
I used a on-off plugin unit instead. Of course those buttons can never be "on", so i changed them to immediately turn off, after they turned on. The only thing is, that most matter controllers do "optimistic updates" and then refresh a bit delayed. This means that you can turn it "On" to trigger the input_button. Then it takes about 2-3 seconds until Alexa is notified that the button is "off" again.

@t0bst4r
Copy link
Owner

t0bst4r commented Dec 15, 2024

This will be included in the next release later today.

@jesusgcas
Copy link

Still not released right? I tried but input buttons are not recognized. Thanks

@pr8x
Copy link

pr8x commented Dec 20, 2024

It's unfortunate that Alexa doesn't allow triggering generic switches... It seems like such a basic thing.

I tested the new input button support, but it doesn't appear to be working properly with Alexa. Created a simple automation that triggers just fine via HA, but the Alexa switch doesn't have any effect.

I am trying to get my Roborock S5 to clean specific rooms via Alexa, but I think Alexa Matter support doesn't allow to specify rooms (yet?). Apparently the roborock skill (only applies to newer models) allows that though: https://www.reddit.com/r/Roborock/comments/lbfdby/alexa_can_clean_rooms_now/

@jesusgcas
Copy link

jesusgcas commented Dec 20, 2024 via email

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

Successfully merging a pull request may close this issue.

5 participants