Good evening all. Super confused here.
I recently started seeing a crap ton of log errors. Granted, I haven’t checked the logs in a while but things started acting funky after jumping two months to the latest stable build.
Logs show these but say there were 27 instances:
Automation with alias ‘Basement work area lights late night weekdays tv on’ could not be validated and has been disabled: Unexpected value for condition: ‘None’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data[‘condition’][1]. Got {‘service’: ‘script.fade_light_v2’, ‘data’: {‘light’: ‘light.basement_work_area_main_lights’, ‘end_pct’: 0, ‘transition’: 45}} required key not provided @ data[‘action’]. Got None
Automation with alias ‘Basement work area lights late night weekends tv on’ could not be validated and has been disabled: Unexpected value for condition: ‘None’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data[‘condition’][1]. Got {‘service’: ‘script.fade_light_v2’, ‘data’: {‘light’: ‘light.basement_work_area_main_lights’, ‘end_pct’: 0, ‘transition’: 45}} required key not provided @ data[‘action’]. Got None
Automation with alias ‘Entry blinds close at sunset 45min before’ failed to setup triggers and has been disabled: Expected HH:MM, HH:MM:SS or Entity ID with domain ‘input_datetime’ or ‘sensor’ @ data[‘at’][0]. Got None
Automation with alias ‘Basement work area lights late night weekdays tv on’ could not be validated and has been disabled: Unexpected value for condition: ‘None’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data[‘condition’][1]. Got {‘service’: ‘script.fade_light_v2’, ‘data’: {‘light’: ‘light.basement_work_area_main_lights’, ‘end_pct’: 1, ‘transition’: 45}} required key not provided @ data[‘action’]. Got None
Automation with alias ‘Basement work area lights late night weekends tv on’ could not be validated and has been disabled: Unexpected value for condition: ‘None’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data[‘condition’][1]. Got {‘service’: ‘script.fade_light_v2’, ‘data’: {‘light’: ‘light.basement_work_area_main_lights’, ‘end_pct’: 1, ‘transition’: 45}} required key not provided @ data[‘action’]. Got None
Nothing has changed and it has worked great for months. I first thought hey it’s the script for fading lights. But, my entry blinds automation is in there too.
Here are the two mentioned automations (not sure what the other 27 may be or if it’s just these two in repeat):
- id: '2028683333308'
alias: Entry blinds close at sunset 45min before
description: ''
trigger:
- platform: sun
event: sunset
offset: -00:44:50
- platform: time
at: '21:00:00'
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.closedentry
mode: single
- id: '1899958999072'
alias: Basement work area lights late night weekdays tv on
trigger:
platform: state
entity_id:
- media_player.lg_webos_tv_8a66
to: 'on'
condition:
- condition: time
after: '20:30'
before: '07:00:00'
weekday:
- sun
- mon
- tue
- wed
- thu
- service: script.fade_light_v2
data:
light: light.basement_work_area_main_lights
end_pct: 1 #0
transition: 45
Suggestions welcome for troubleshooting this.
EDIT:
I forgot to add this new, recurring error:
Logger: homeassistant.components.script.fade_light_v2
Source: helpers/script.py:410
Integration: Script (documentation, issues)
First occurred: 7:00:16 PM (3 occurrences)
Last logged: 7:40:01 PMfade_light_v2: Error executing script. Error rendering template for variables at pos 1: ZeroDivisionError: division by zero
Logger: homeassistant.components.automation.upstairs_hallway_area_lights_late_night_set_brightness_if_lights_already_on_2
Source: components/automation/init.py:580
Integration: Automation (documentation, issues)
First occurred: 7:40:01 PM (1 occurrences)
Last logged: 7:40:01 PMError while executing automation automation.upstairs_hallway_area_lights_late_night_set_brightness_if_lights_already_on_2: ZeroDivisionError: division by zero
I had assumed it was related to the end percent being 0 (zero) which worked forever. But, changing that value didn’t stop the errors from popping back up on restart.