hi.
i’ve used home assistant for a while now, and i feel like i’m barely scratching the surface of what it can do. is there a tutorial or a reference manual i can use to learn about all the different trigger types and action types, what they are good for and how to use them?
for example, i want to trigger an automation every time an entity (like lightning distance) changes, not just when it crosses a threshold. is that possible? if so, how?
as i said in the OP, i want to trigger an automation when lightning is detected. the problem is, i CAN’T get it to work. either i get tons of error messages (but no indication where the error is) or it just WILL NOT trigger. i don’t know enough about home assistant to figure out what i’m doing wrong. can someone point me in the right direction?
Your original question has been answered; use a State Trigger.
Your follow-up post indicates you have already attempted but failed to create a functional automation. Post the automation in YAML format (refer to guideline 11 in the FAQ).
i’ve run into another problem: the trigger works, and so does the condition. BUT it does not set the input number.
here’s the action:
action:
- service: input_number.set_value
data:
value:
"[object Object]": null <- this is where the sensor value (sensor.blitzortung_lightning_distance) should go, but when i save the automation, it resets to this line :-( what am i doing wrong?
target:
entity_id: input_number.minimum_lightning_distance
You can simulate it by going to Developer Tools > States, selecting sensor.blitzortung_lightning_distance, enter a new value for the sensor’s state and then click the Set State button. Effectively, you are forcing the sensor’s value to change. The sensor’s new value will cause your automation to be triggered.
While you are performing the test, the sensor’s value may be changed by its underlying integration.
After you have finished testing the automation, you may need to set the sensor’s value back to its original value (unless the sensor’s integration has already done it).
I provided another user with similar instructions here: