I have a raspberry pi 3 with an aeotec zwave stick. Sometimes when automations run, a random light will be skipped. I can see all of the devices seem to have a good connection from the zwave integration, I also installed an aeotec zwave repeater in the middle of our house to be safe. Would anyone know why this would happen?
The main reason I want to use home assistant, is to auto turn on lights at sunset, and then dim them later after sunset. If someone overrides a light brightness on the physical switch, then the automation that follows shouldn’t stomp on what they have set. Here is one sample automation that runs 30 mins after sunset. (below). I have 2 more that run later in the evening after this:
alias: Light - Night(+30) - Medium Brightness
description: ''
trigger:
- platform: sun
event: sunset
offset: '+00:30:00'
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.main_bedroom', 'on') and
state_attr('light.main_bedroom', 'brightness') | int > 120 and
state_attr('light.main_bedroom', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.main_bedroom
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.claire_room', 'on') and
state_attr('light.claire_room', 'brightness') | int > 120 and
state_attr('light.claire_room', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.claire_room
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.paul_room', 'on') and
state_attr('light.paul_room', 'brightness') | int > 120 and
state_attr('light.paul_room', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.paul_room
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.downstairs_bedroom', 'on') and
state_attr('light.downstairs_bedroom', 'brightness') | int > 120
and state_attr('light.downstairs_bedroom', 'brightness') | int <
135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.downstairs_bedroom
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.upstairs_bathroom', 'on') and
state_attr('light.upstairs_bathroom', 'brightness') | int > 120 and
state_attr('light.upstairs_bathroom', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.upstairs_bathroom
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.upstairs_shower', 'on') and
state_attr('light.upstairs_shower', 'brightness') | int > 120 and
state_attr('light.upstairs_shower', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.upstairs_shower
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.downstairs_bathroom', 'on') and
state_attr('light.downstairs_bathroom', 'brightness') | int > 120
and state_attr('light.downstairs_bathroom', 'brightness') | int <
135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.downstairs_bathroom
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.kitchen_pots', 'on') and
state_attr('light.kitchen_pots', 'brightness') | int > 120 and
state_attr('light.kitchen_pots', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.kitchen_pots
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.pots', 'on') and state_attr('light.pots',
'brightness') | int > 120 and state_attr('light.pots',
'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.pots
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.front_door', 'on') and
state_attr('light.front_door', 'brightness') | int > 120 and
state_attr('light.front_door', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.front_door
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.pendants', 'on') and
state_attr('light.pendants', 'brightness') | int > 120 and
state_attr('light.pendants', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.pendants
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.upstairs_living_room', 'on') and
state_attr('light.upstairs_living_room', 'brightness') | int > 120
and state_attr('light.upstairs_living_room', 'brightness') | int <
135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.upstairs_living_room
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.table', 'on') and state_attr('light.table',
'brightness') | int > 120 and state_attr('light.table',
'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.table
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.under_cabinet', 'on') and
state_attr('light.under_cabinet', 'brightness') | int > 120 and
state_attr('light.under_cabinet', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.under_cabinet
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.upstairs_hallway', 'on') and
state_attr('light.upstairs_hallway', 'brightness') | int > 120 and
state_attr('light.upstairs_hallway', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.upstairs_hallway
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.downstairs_hallway', 'on') and
state_attr('light.downstairs_hallway', 'brightness') | int > 120
and state_attr('light.downstairs_hallway', 'brightness') | int <
135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.downstairs_hallway
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.downstairs_hallway_2', 'on') and
state_attr('light.downstairs_hallway_2', 'brightness') | int > 120
and state_attr('light.downstairs_hallway_2', 'brightness') | int <
135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.downstairs_hallway_2
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.downstairs_living_room', 'on') and
state_attr('light.downstairs_living_room', 'brightness') | int >
120 and state_attr('light.downstairs_living_room', 'brightness') |
int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.downstairs_living_room
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ is_state('light.hue_white_lamp_1', 'on') and
state_attr('light.hue_white_lamp_1', 'brightness') | int > 120 and
state_attr('light.hue_white_lamp_1', 'brightness') | int < 135 }}
sequence:
- service: light.turn_on
data:
brightness_pct: 40
target:
entity_id: light.hue_white_lamp_1
default: []
mode: single
Taking a look after, in the logs, I see a node that gets skipped, or doesn’t get it’s new brightness. I see this log but after this node’s brightness just stayed at its old Level which was 25 (not 50).:
2021-03-17 17:39:23.679 Detail, Node002, Refreshed Value: old value=255, new value=255, type=byte
2021-03-17 17:39:23.679 Detail, Node002, Changes to this value are not verified
2021-03-17 17:39:23.679 Detail, Node002, Notification: ValueChanged
2021-03-17 17:39:23.680 Info, Node002, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 50
2021-03-17 17:39:23.680 Info, Node002, SwitchMultilevel::Set - Setting to level 50
2021-03-17 17:39:23.680 Info, Node002, Duration: Default
2021-03-17 17:39:23.680 Detail, Node002, Queuing (Send) SwitchMultilevelCmd_Set (Node=2): 0x01, 0x0b, 0x00, 0x13, 0x02, 0x04, 0x26, 0x01, 0x32, 0xff, 0x25, 0x2c, 0x02
2021-03-17 17:39:23.680 Detail, Node002, Queuing (Send) SwitchMultilevelCmd_Get (Node=2): 0x01, 0x09, 0x00, 0x13, 0x02, 0x02, 0x26, 0x02, 0x25, 0x2d, 0xc9
If I wait a couple minutes, re-run the same automation, the light gets it’s correct brightness set to 50. I looked through the logs, and it looks the same. The only difference I noticed is the RTT is lower.