HA not logging automations?

Hi
Got HA running on a Raspberry Pi 4 - and I’m trying to work out why my (simple) automations aren’t firing?
E.g. I’ve got a zigbee temp sensor - I can see that temperature is changing - and although I’ve got an automation with the trigger of temp sensor - change temperature, I don’t see runs in the traces of the automation, and I don’t see things being logged in the system log.

I would have thought that there’s a log that I can examine where it lists all the events that are firing in the system - if so, can someone let me know where that is - there appears to be very little in the home-assistant.log?

I’m thinking that if I can do a tail -f on the log, at least I can see that things like the temperature change is being noticed…

Unless there’s a verbosity configuration?

Many thanks
Carl.

Post your automation.

…as properly-formatted YAML (see here).

And the state / attributes of your temperature sensor, like this:

1 Like

Hi

Here’s the YAML:

alias: CarlStudy turn on heater if too cold
description: ""
trigger:
  - type: temperature
    platform: device
    device_id: 374c1fd78d9d509e534914dc7b6bd245
    entity_id: 88ed44712361b29044c54198ff7606c1
    domain: sensor
    below: 18
condition: []
action:
  - type: turn_on
    device_id: 3c4daf90a1c03dc86fa7f639ca9d7059
    entity_id: 3222e3fdf8f5ceef61fb24d22eacbfa9
    domain: switch
mode: single

However, I think Stiltjack’s comment appears to be the answer - I was thinking that I should see a trace for each time the temperature changes - not when the temperature changes from 19 down to 18… saying that, what happens when say a reading is missed and it drops from 19.1 down to 17…? will the trigger still catch it? As the trigger is ‘below’ 18, then I guess so?
Thanks
Carl.

When the threshold is crossed, yes. It will not trigger again until above and going below again, in your case.

Only if it was triggered there will be a trace. If you use a state trigger with a numeric state condition (the same outcome, but perhaps less efficient), you’ll see a trace with every change that stops at the condition (if above, of course).

You should steer away from using devices. Just use a numeric state trigger.

Hi
Many thanks for the information - interesting reading - I’ll see if I can swap things over… :slight_smile:

Much appreciated!
Carl.