home-assistant / frontend

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

Multiple automations with time conditional and brightness_pct does not work #2699

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): Had this problem since i started with HA and Tradfri in 2017

Browser and Operating System:

Crome Windows10 Chrome Android 8/9 Description of problem:

I have for some time been trying to set up automations for my lights (tradfri) with different brightness based on time when triggered by a PIR in the automations editor. I have set up different automations with time conditionals for after 07:00:00 before 23:59:59 and after 00:00:00 before 07:59:59 but when I insert brightness_pct: (value) on a line above the entity_I’d in the service data field the automation stops working. Without brightness it works as it is supposed to.

It works just setting an automation without a time conditional and a light_on with a brightness_pct value. It also behaves like this with the regular brightnes (0-255) value. An And if I'm not wrong, it even works with just one automation with a time condtional and an action with brightness, but when there are two automations with the same trigger event, a time condition and brightness it just does not work.

I have experienced this problem for a long time and thought it might be solved in future releases, but since it is still unsolved it looks like I have to file this bug report.

I am only using the automation ui. No errors in homeassistant-log.txt

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

Additional information:

Here is my automations.yaml. I am aware of the inconsistent apostrophe encapsulation on time values and have filed a separate repport on that. I have cleaned up this manualy but it did not change the behaviour on my automations.

- id: '1548785885000'
  alias: Lys plantelys off
  trigger:
  - at: '21:00:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: light.plantelys_group
    service: light.turn_off
- id: '1548787329983'
  alias: Lys plantelys on
  trigger:
  - at: 08:00:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: light.plantelys_group
    service: light.turn_on
- id: '1548787451454'
  alias: Lys terrasse off
  trigger:
  - at: 00:00:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: light.terrasse
    service: light.turn_off
- id: '1548787611548'
  alias: Lys terrasse on
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - data:
      entity_id: light.terrasse
    service: light.turn_on
- id: '1548787710871'
  alias: Lys hage off
  trigger:
  - event: sunrise
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.lys_hage
    service: switch.turn_off
- id: '1548787754899'
  alias: Lys hage on
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - data:
      entity_id: switch.lys_hage
    service: switch.turn_on
- id: '1548787839196'
  alias: Lys veranda on
  trigger:
  - entity_id: binary_sensor.pir_veranda
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: sunset
    condition: sun
  - after: sunset
    before: sunrise
    condition: sun
  action:
  - data:
      entity_id: switch.lys_veranda
    service: switch.turn_on
- id: '1548787891801'
  alias: Lys veranda off
  trigger:
  - entity_id: binary_sensor.pir_veranda
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: switch.lys_veranda
    service: switch.turn_off
- id: '1548788131090'
  alias: Lys entre on
  trigger:
  - entity_id: binary_sensor.pir_entre
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.entre
    service: light.turn_on
- id: '1548788215043'
  alias: Lys entre off
  trigger:
  - entity_id: binary_sensor.pir_entre
    for: 00:02:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.entre
    service: light.turn_off
- id: '1548788618767'
  alias: Lys bua off
  trigger:
  - entity_id: binary_sensor.pir_bua
    for: 00:15:00
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.bua
    service: light.turn_off
- id: '1548795677739'
  alias: Lys bua on
  trigger:
  - entity_id: binary_sensor.pir_bua
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.bua
    service: light.turn_on
- id: '1548795749589'
  alias: Lys aquarium off
  trigger:
  - at: '23:00:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.lys_aquarium
    service: switch.turn_off
- id: '1548795820146'
  alias: Lys aquarium on
  trigger:
  - at: '12:00:00'
    platform: time
  condition: []
  action:
  - data:
      entity_id: switch.lys_aquarium
    service: switch.turn_on
- id: '1548795943113'
  alias: Lys kitchen on 7-23
  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: Lys 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: Lys gang on 00-07
  trigger:
  - entity_id: binary_sensor.pir_gang
    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.gang
    service: light.turn_on
- id: '1548796332064'
  alias: Lys gang off
  trigger:
  - entity_id: binary_sensor.pir_gang
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.gang
    service: light.turn_off
- id: '1548796401433'
  alias: Lys spisestue on 7-23
  trigger:
  - entity_id: binary_sensor.pir_stueost
    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.spisestue
    service: light.turn_on
- id: '1548796464197'
  alias: Lys spsiestue off
  trigger:
  - entity_id: binary_sensor.pir_stueost
    for: 00:30:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.spisestue
    service: light.turn_off
- id: '1548796566142'
  alias: Lys bod on
  trigger:
  - entity_id: binary_sensor.pir_bod
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.bod
    service: light.turn_on
- id: '1548796621769'
  alias: Lys bod off
  trigger:
  - entity_id: binary_sensor.pir_bod
    for: 00:02:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.bod
    service: light.turn_off
- id: '1548796686594'
  alias: Lys sauna on
  trigger:
  - entity_id: switch.ovn_sauna
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: light.sauna
    service: light.turn_on
- id: '1548796746841'
  alias: Lys sauna off
  trigger:
  - entity_id: switch.ovn_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.ovn_sauna
    for: 04:00:00
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: switch.ovn_sauna
    service: switch.turn_off
- id: '1548844649466'
  alias: Lys toalett on day
  trigger:
  - entity_id: binary_sensor.pir_toalett
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: 08:00:00
    before: '23:59:59'
    condition: time
  action:
  - data:
      brightness: 100
      entity_id: light.toalett
    service: light.turn_on
- id: '1548844718862'
  alias: Lys toalett off
  trigger:
  - entity_id: binary_sensor.pir_toalett
    for: 00:05:00
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      entity_id: light.toalett
    service: light.turn_off
- id: '1548899908163'
  alias: Lys gang on 07-24
  trigger:
  - entity_id: binary_sensor.pir_gang
    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.gang
    service: light.turn_on
- id: '1548900953061'
  alias: Lys spisestue 23-7
  trigger:
  - entity_id: binary_sensor.pir_stueost
    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.spisestue
    service: light.turn_on
- id: '1548901107723'
  alias: Lys kitchen 23-7
  trigger:
  - entity_id: binary_sensor.pir_stueost
    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: Lys toalett on night
  trigger:
  - entity_id: binary_sensor.pir_toalett
    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_toalett
    service: light.turn_on
2rs commented 5 years ago

should not have been placed in home-assistant-polymer