Hi all I’m having some trouble creating an automation.
here is what I’m tryin to accomplish:
if master-bedroom-ac is off then mppsolar-inverter-0 Change
inverter0_output_source_priority_select option is set to SBU else then
ppsolar-inverter-0 Change inverter0_output_source_priority_select option is
set to Utility first.
here is my YAML file
alias: if master-bedroom-ac is off
description: >-
if master-bedroom-ac is off then mppsolar-inverter-0 Change
inverter0_output_source_priority_select option is set to SBU else then
ppsolar-inverter-0 Change inverter0_output_source_priority_select option is
set to Utility first
mode: single
trigger:
- platform: device
device_id: bb7fe9e1a97632a10066960d5adc80fe
domain: climate
entity_id: climate.master_bedroom_ac
type: hvac_mode_changed
condition: []
action:
- if:
- condition: device
device_id: bb7fe9e1a97632a10066960d5adc80fe
domain: climate
entity_id: climate.master_bedroom_ac
type: is_hvac_mode
hvac_mode: 'off'
then:
- device_id: de6313df2cddf16b3469452252e64db3
domain: select
entity_id: select.inverter0_output_source_priority_select
type: select_option
option: Solar Battery Utility
else:
- device_id: de6313df2cddf16b3469452252e64db3
domain: select
entity_id: select.inverter0_output_source_priority_select
type: select_option
option: Utility first
and I’m getting this error:
Message malformed: required key not provided @ data[‘to’]
But I tried with my device and it also errors. It seems odd that it generates that code in the UI but then barfs at saving it for the device trigger.
Just add this if you’re look for a specific mode trigger. If you want for ANY changes, you’ll probably need to change this to use a state on a entity instead of device I think.
to:
It sure seems like a UI bug to me. and its been around a while…