Tons of log errors after updating - nothing changed

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 PM

fade_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 PM

Error 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.

At least for that one, you miss action: like in

  action:
  - service: scene.turn_on

so it’s very unlikely that automation ever worked, even before updating :wink:

@koying Actually, all automations have worked and they all use that.

This morning my bedroom blinds popped open:

  action:
  - service: scene.turn_on
    target:
      entity_id: scene.early_morning

See Hunter Douglas PowerView - Home Assistant if you question it.

Anyone else got thoughts out there?

No.

 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

That is not valid, and the error tells you that

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

Key is

Got {‘service’: ‘script.fade_light_v2

which is not a valid condition, obviously, because it is the action and you miss the action: line.

But feel free to ignore me as much as I’ll ignore you from now on.

@koying apologies for my part, however your first statement about the scene was like “hey dude you’re a dumbass” even though it matched the documentation and worked/works as written.

My “dumbass” side comes in when looking at the other automation as you just pointed out.

I found, in the past several minutes, that my automations.yml ended up corrupted during the upgrade process.

For instance, trigger times became like “690003”, random action lines are missing, and other issues.

Apologies accepted, but for the future, avoid the “Nothing has changed, it worked before” before being 100% sure, or I’m afraid you actually don’t show your brightest side :slight_smile:

Yes, I should have written “I didn’t change a damn thing” vs. nothing changed. Clearly, something went topsy turvy. Now to drink a spiked coffee this morning.

1 Like

I disagree, that’s your perception.
This is not a helpdesk, people are helping you on their personal time, for free.
I understand that it can be frustrating that after an update things don’t work as expected and you will get help here most likely.
Making friends or enemies can play a role in the way you are helped.

@Nick4 I do not disagree with your assessment. The post was not my best moment on the forum. Hence my apology. For what it’s worth I directly conversed with @koying apologizing further vs. put it in this thread.

Alas, instead of rushing into this matter upon waking up I should’ve better taken the time to review it, review my situation again, and I would’ve more promptly come to the conclusion that something corrupted and to just replace my automations.yml with a backup copy.

1 Like