I just started using z-wave with home assistant & a aeon labs z-wave stick. I was able to add and control several devices, some of which operate on battery. The battery level is reported by the devices:
So I though I could easily create a automation to send me a message when the battery was running out:
- alias: monitor battery bewegings sensor grote zolderkamer
trigger:
platform: numeric_state
entity_id: zwave.beweginsensorgrotezolderkamer.battery_level
below: 10
action:
service: notify.pushbullet
data:
message: "Batterij niveau bewegings sensor grote zolderkamer onder 10%"
Unfortunately, there seems to be something wrong with the entity id, I get this error in the log:
2018-01-14 16:39:36 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID zwave.beweginsensorgrotezolderkamer.battery_level is an invalid entity id for dictionary value @ data['trigger'][0]['entity_id']. Got None. (See /home/pi/.homeassistant/configuration.yaml, line 449). Please check the docs at https://home-assistant.io/components/automation/
Any idea what would be the right way to get the battery level?
Thanks for the suggestion. At first I thought it worked, I only had a error in the log about some other (unrelated) line of my automations.yaml, but now that I’ve added 5 of these automations, I get 5 errors, so it seems like there’s a problem with this automation after all.
The error reads:
2018-01-26 14:27:06 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data[‘trigger’][0][‘entity_id’]. Got None. (See /home/pi/.homeassistant/configuration.yaml, line 486). Please check the docs at Automation - Home Assistant
The Strange thing is that the error references the file configuration.yaml, not automations.yaml where I added that automation.
On line 486 of configuration.yaml I only have:
group: !include groups.yaml
followed by:
automation: !include automations.yaml
To be sure the error was about this automation, I removed all other automatons from automations.yaml, just leaving this one. With that the error message still showed up. As soon as I removed the automation, I had no more errors.