feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

Add support for responding services

Open gagebenne opened this issue 1 year ago • 1 comments

Describe the problem you have/What new integration you would like Home Assistant 2023.7 added the ability for a service to respond: https://www.home-assistant.io/blog/2023/07/05/release-20237/#services-can-now-respond

esphome does not seem to support this new functionality: https://esphome.io/components/api.html#user-defined-services

Please describe your use case for this integration and alternatives you've tried: I have a pet feeder that is able to detect whether a feeding dispensed food or not. The feeding is a esphome-defined service, which I would like to respond whether the feeding was successful or not.

Additional context

gagebenne avatar Jan 10 '24 14:01 gagebenne

Yes if there was a way to call a home assistant service and import its response into a response_variable: that would be fantastic.

globals:
  - id: forecast
    type: std::string
    restore_value: no
  
on..:
homeassistant.service:
service: weather.get_forecast
data:
  type: daily
target:
  entity_id: weather.home
on_response:
   then:
      - lambda: |-
             id(forecast) = x;

niahane avatar Apr 14 '24 12:04 niahane