Closed nagyrobi closed 5 months ago
@dgomes , conditions used in a similarly working component: https://github.com/aneeshd/schedule_state/blob/1b994009662faa6969cb33b629aaffa97d98cc41/custom_components/schedule_state/sensor.py#L368
In case this would be addressed: why not go and allow the full script syntax in that place? I'm sure the HA devs have some helper that makes this easy. Maybe even easier than "manually" iterating though a list of service calls.
Edit:
This seems to be a good template for using scripts in other components: https://github.com/home-assistant/core/blob/dev/homeassistant/components/template/switch.py
Is your feature request related to a problem? Please describe. I'd like to display a message on the plate when a button is pressed, but only when the sun is up.
Describe the solution you'd like Use conditions, pretty much like in automations, in object events.
Describe alternatives you've considered Putting this in a script outside the component. But this makes the whole thing very clunky if you have lots of things like this.
Additional context Add any other context or screenshots about the feature request here.