home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.96k stars 2.69k forks source link

Automation editor formats to inconsistent apostrophes on time values #2697

Closed 2rs closed 5 years ago

2rs commented 5 years ago

Home Assistant release with the issue:

arch: armhf channel: stable hassos: "1.13" homeassistant: 0.86.4 hostname: hassio machine: raspberrypi3 supervisor: "143" supported_arch:

Last working Home Assistant release (if known): Only noticed inconsistent formating recently

Browser and Operating System:

Chrome Windows10 Chrome Android 8/9

Description of problem:

Editor behaves inconsistent when encapsulating time values with apostrophes. Sometimes with and sometimes not. I've noticed this with time values. If I clean up my automations.yaml manually the editor wil remove my clean up and back to inconsistent encapsulation the next time the editor is started.

Javascript errors shown in the web inspector (if applicable):

Additional information:

This is from my automations.yaml file. All built with automations editor.

[- id: '1548785885000'
  alias: Light plantlight off
  trigger:
  - at: '21:00:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: light.plantlight_group
    service: light.turn_off
- id: '1548787329983'
  alias: Light plantlight on
  trigger:
  - at: 08:00:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: light.plantlight_group
    service: light.turn_on
- id: '1548787451454'
  alias: Light terrasse off
  trigger:
  - at: 00:00:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: light.terrasse
    service: light.turn_off
- id: '1548787611548'
  alias: Light terrasse on
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - data:
      entity_id: light.terrasse
    service: light.turn_on
- id: '1548787710871'
  alias: Light garden off
  trigger:
  - event: sunrise
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.light_garden
    service: switch.turn_off
- id: '1548787754899'
  alias: Light garden on
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.light_garden
    service: switch.turn_on
- id: '1548787839196'
  alias: Light porch on
  trigger:
  - entity_id: binary_sensor.pir_porch
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: sunset
    condition: sun
  - after: sunset
    before: sunrise
    condition: sun
  action:
  - data:
      entity_id: switch.light_porch
    service: switch.turn_on
- id: '1548787891801'
  alias: Light porch off
  trigger:
  - entity_id: binary_sensor.pir_porch
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: switch.light_porch
    service: switch.turn_off
- id: '1548788131090'
  alias: Light entrance on
  trigger:
  - entity_id: binary_sensor.pir_entrance
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.entrance
    service: light.turn_on
- id: '1548788215043'
  alias: Light entrance off
  trigger:
  - entity_id: binary_sensor.pir_entrance
    for: 00:02:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.entrance
    service: light.turn_off
- id: '1548788618767'
  alias: Light shed off
  trigger:
  - entity_id: binary_sensor.pir_shed
    for: 00:15:00
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.shed
    service: light.turn_off
- id: '1548795677739'
  alias: Light shed on
  trigger:
  - entity_id: binary_sensor.pir_shed
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.shed
    service: light.turn_on
- id: '1548795749589'
  alias: Light aquarium off
  trigger:
  - at: '23:00:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.light_aquarium
    service: switch.turn_off
- id: '1548795820146'
  alias: Light aquarium on
  trigger:
  - at: '12:00:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.light_aquarium
    service: switch.turn_on
- id: '1548795943113'
  alias: Light kitchen on day
  trigger:
  - entity_id: binary_sensor.pir_kitchen
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 07:00:00
    before: '22:59:59'
    condition: time
  action:
  - data:
      brightness_pct: 100
      entity_id: light.kitchen
    service: light.turn_on
- id: '1548796005176'
  alias: Light kitchen off
  trigger:
  - entity_id: binary_sensor.pir_kitchen
    for: 00:15:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.kitchen
    service: light.turn_off
- id: '1548796266933'
  alias: Light hallway on night
  trigger:
  - entity_id: binary_sensor.pir_hallway
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 00:00:00
    before: 06:59:59
    condition: time
  action:
  - data:
      brightness_pct: 10
      entity_id: light.hallway
    service: light.turn_on
- id: '1548796332064'
  alias: Light hallway off
  trigger:
  - entity_id: binary_sensor.pir_hallway
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.hallway
    service: light.turn_off
- id: '1548796401433'
  alias: Light diningroom on day
  trigger:
  - entity_id: binary_sensor.pir_diningroom
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 07:00:00
    before: '23:00:00'
    condition: time
  action:
  - data:
      brightness_pct: 100
      entity_id: light.diningroom
    service: light.turn_on
- id: '1548796464197'
  alias: Light spsiestue off
  trigger:
  - entity_id: binary_sensor.pir_diningroom
    for: 00:30:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.diningroom
    service: light.turn_off
- id: '1548796566142'
  alias: Light pantry on
  trigger:
  - entity_id: binary_sensor.pir_pantry
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.pantry
    service: light.turn_on
- id: '1548796621769'
  alias: Light pantry off
  trigger:
  - entity_id: binary_sensor.pir_pantry
    for: 00:02:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.pantry
    service: light.turn_off
- id: '1548796686594'
  alias: Light sauna on
  trigger:
  - entity_id: switch.oven_sauna
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.sauna
    service: light.turn_on
- id: '1548796746841'
  alias: Light sauna off
  trigger:
  - entity_id: switch.oven_sauna
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.sauna
    service: light.turn_off
- id: '1548796819052'
  alias: Sauna auto off
  trigger:
  - entity_id: switch.oven_sauna
    for: 04:00:00
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.oven_sauna
    service: switch.turn_off
- id: '1548844649466'
  alias: Light bathroom on day
  trigger:
  - entity_id: binary_sensor.pir_bathroom
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 08:00:00
    before: '23:59:59'
    condition: time
  action:
  - data:
      brightness: 100
      entity_id: light.bathroom
    service: light.turn_on
- id: '1548844718862'
  alias: Light bathroom off
  trigger:
  - entity_id: binary_sensor.pir_bathroom
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.bathroom
    service: light.turn_off
- id: '1548899908163'
  alias: Light hallway on day
  trigger:
  - entity_id: binary_sensor.pir_hallway
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 07:00:00
    before: '23:59:59'
    condition: time
  action:
  - data:
      brightness_pct: 100
      entity_id: light.hallway
    service: light.turn_on
- id: '1548900953061'
  alias: Light dining room night
  trigger:
  - entity_id: binary_sensor.pir_diningroom
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: '23:00:00'
    before: 06:59:59
    condition: time
  action:
  - data:
      brightness_pct: 10
      entity_id: light.diningroom
    service: light.turn_on
- id: '1548901107723'
  alias: Light kitchen night
  trigger:
  - entity_id: binary_sensor.pir_diningroom
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: '23:00:00'
    before: 06:59:59
    condition: time
  action:
  - data:
      brightness_pct: 10
      entity_id: light.kitchen
    service: light.turn_on
- id: '1548965122964'
  alias: Light bathroom on night
  trigger:
  - entity_id: binary_sensor.pir_bathroom
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 00:00:00
    before: 07:59:59
    condition: time
  action:
  - data:
      brightness_pct: 10
      entity_id: light_bathroom
    service: light.turn_on
](`url`)
2rs commented 5 years ago

should not have been placed in home-assistant-polymer