Initiate a "press" on an button-entity

Hi folks,

I’m looking for a way to trigger a button press via AppDaemon for the HomeAssistant “button” domain.
So far I was not able to initiate one.
The hass api “turn_on” in AD leads to an error in HA logs where it states:

The service homeassistant.turn_on does not support entities button.bedroom_on

Do you have an idea how I could trigger such an event via AD?

Regards,
Chris

You’re going to want to use a standard call_service function within which you’ll define the domain and service name along with the entity ID.

For what you’re trying to do:

self.call_service("button/press", entity_id = "button.bedroom_on")
1 Like