@wellsy wrote:
In the process of shifting my config to 0.110.xx I had a relatively trouble free run and set about my normal workflows to add functionality to my production environment which is now sitting on the 0.110.3 release.
Working away at an automation for a temporary fix related to how my outside lights are automated.
NOTE: the one I’m working on is:Update Occupied Status From Laundry
Here is a snippet of my current working automation.yaml (NOTE how human readable it is):
#********************************************************** # PI UPS Battery <90% Alert Notification Automation # sensor.ups_battery # #********************************************************** - id: PiUpsBattery<90Information alias: Pi UPS Battery <90 Information Notification trigger: platform: numeric_state entity_id: sensor.ups_battery below: 90 for: minutes: 2 action: service: notify.my_bot data: message: "INFORMATION! The UPS Battery is now below 90%" #********************************************************** # Reset sonoff binary sensors on HA restart # sonoff19 Power2 # Other? Just add more - data: items #********************************************************** - id: 'UpdateBinarySensorStatus' alias: Update Binary Sensor Status trigger: - event: start platform: homeassistant condition: [] action: - data: payload: '' topic: cmnd/sonoff19/Power2 service: mqtt.publish #********************************************************** # Update Occupied Status From Laundry # switch.laundry_door_downlight # sonoff15/Event # sonoff13/Event # sonoff17/Event #********************************************************** - id: UpdateOccupiedStatusFromLaundry alias: Update Occupied Status From Laundry trigger: - entity_id: switch.laundry_door_downlight platform: state to: 'on' condition: [] action: - data: topic: cmnd/sonoff15/Event payload: Movement_tankPath service: mqtt.publish - data: topic: cmnd/sonoff13/Event payload: Movement_Patio service: mqtt.publish - data: topic: cmnd/sonoff17/Event payload: Movement_sidePath service: mqtt.publish #********************************************************** # Long Press testing # sonoff03 Power1 # Works well! #********************************************************** - id: 'HoldForTankLight' alias: Hold For Tank Light initial_state: true trigger: - entity_id: sensor.outside_light platform: state to: 'HOLD' action: - data: entity_id: light.tank service: light.toggle - data: entity_id: light.side_1 service: light.toggle - data: entity_id: light.patio service: light.toggle #********************************************************** # Start Fan Speed Automation #********************************************************** # Update Rumpus Fan Speed OFF # stat/sonoff05/POWER4 # input_select.rumpus_fan_speed #********************************************************** # This automation script runs when the rumpus fan speed selector is changed to off. # It publishes its value to the same MQTT topic it is also subscribed to. #********************************************************** - id: 'SetRumpusFanSpeedOff' alias: Set Rumpus Fan Speed Off trigger: platform: state entity_id: input_select.rumpus_fan_speed to: 'off' action: - data: entity_id: light.fan_off service: light.turn_on
So after running up against a load of problems which I couldn’t quite solve myself I turned to the forum (as you do) and found a few ideas and made some changes but none of them helped so I thought to myself “Ok…lets see how the UI automation thingy works?” Well I opened it up and had a bit of a look at the UI and must admit it looks pretty nifty…however!!! The moment I saved a very minor change to one line of my automation an horrific and totally unexpected change (which was irreversible in the UI) was created.
Below is the same snippet after saving 1 line of 1 automation in my automation.yaml:
- id: PiUpsBattery<90Information alias: Pi UPS Battery <90 Information Notification trigger: platform: numeric_state entity_id: sensor.ups_battery below: 90 for: minutes: 2 action: service: notify.my_bot data: message: INFORMATION! The UPS Battery is now below 90% - id: UpdateBinarySensorStatus alias: Update Binary Sensor Status trigger: - event: start platform: homeassistant condition: [] action: - data: topic: cmnd/sonoff19/Power2 service: mqtt.publish # here - id: UpdateOccupiedStatusFromLaundry alias: Update Occupied Status From Laundry trigger: - entity_id: switch.laundry_door_downlight platform: state to: 'on' condition: [] action: - data: topic: cmnd/sonoff15/Event payload: Movement_tankPath service: mqtt.publish - data: topic: cmnd/sonoff13/Event payload: Movement_Patio service: mqtt.publish - data: topic: cmnd/sonoff17/Event payload: Movement_sidePath service: mqtt.publish - id: UpdateOccupiedStatusFromPatio alias: Update Occupied Status From Patio trigger: - entity_id: light.patio platform: state to: 'on' condition: [] action: - data: topic: cmnd/sonoff15/Event payload: Movement_tankPath service: mqtt.publish - data: topic: cmnd/sonoff13/Event payload: Movement_Patio service: mqtt.publish - data: topic: cmnd/sonoff17/Event payload: Movement_sidePath service: mqtt.publish - id: HoldForTankLight alias: Hold For Tank Light initial_state: true trigger: - entity_id: sensor.outside_light platform: state to: HOLD action: - data: entity_id: light.tank service: light.toggle - data: entity_id: light.side_1 service: light.toggle - data: entity_id: light.patio service: light.toggle - id: SetRumpusFanSpeedOff alias: Set Rumpus Fan Speed Off trigger: platform: state entity_id: input_select.rumpus_fan_speed to: 'off' action: - data: entity_id: light.fan_off service: light.turn_on
I won’t use the words I used here on finding my entire automations.yaml destroyed in such a fashion as the language nazis may ban me forever!
Does anyone here think it’s ok for a UI to do that to someones carefully considered YAML commenting by saying yes to a change in 1 line of YAML?
My final comment is contained in the heading and even has two words capitalized (god forbid!).
Why would you EVER want to lose YAML? Indeed!
Posts: 3
Participants: 2