Can anyone find my error? I copied a working automation which logs an action to a csv file successfully. Now I want to log changes of user to a csv file. I copied the automation and the notify and the csv file (with suitable name changes), restarted HA, but I keep getting the warning Referenced entities notify.logusers missing...
I’m pretty sure I’ve made a simple typo, but I can’t see it. Can anyone spare a minute to look?
In configuration.yaml I’ve got:
notify:
- name: logusers
platform: file
filename: /config/www/log/userlog.csv
timestamp: true
I’ve also got an automation:
alias: UsersLog
description: Logs any change of browser_users
triggers:
- entity_id:
- sensor.browser_users
trigger: state
conditions: []
actions:
- target:
entity_id: notify.logusers
data:
message: >-
{{as_timestamp(now(),0)|timestamp_custom('%Y-%m-%dT%H:%M',true,none)~','~states('sensor.browser_users')}},
{{state_attr('sensor.browser_users','using')}}
action: notify.send_message
mode: single
initial_state: "on"
Plus I’ve created an empty file named userlog.csv
in the directory /config/www/log
There is no entity called notify.logusers
despite restarting HA and reloading the YAML files a few times. There is an entity called sensor.browser_users
and it does have an attribute using
sensor.browser_users
browser_users
RNLI,
names: dji_xps15_chrome(24Nov14:55), dji_xps15_firefox2(24Nov15:16), dji_p9_l_app(24Nov14:45),
using: dji_xps15_firefox2/RNLI(24Nov15:16),
all: 3
rnli: 0
gig: 0
dji: 3
recents: dji_xps15_firefox2(24Nov15:16), None
recents-dji: dji_xps15_firefox2(24Nov15:16), None
friendly_name: browser_users