Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106388

Automation based on brightness and state

$
0
0

current situation: The lights in the hallway are triggered by a sensor (just low brightness).
That works fine.

Now I want to add a switch that does the following:
if light is on and above a certain threshold: switch light off
if light is on and below a certain threshold: change to full brightness
if light is off: switch light on on full brightness

I already have a setup that works and is doing exactly what I described above. The only problem is: The functionality that covers the switch on/increase brightness is throwing an error every time it’s triggered (even though it works).

The automation in question:

alias: Flur unten ein (manuell)
description: ''
trigger:
  - device_id: c3d689b159b2c55de67b2cda9a331dba
    domain: deconz
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition:
  - condition: or
    conditions:
      - condition: device
        type: is_off
        device_id: f3d47241032a11eba506cdbdcb522cb7
        entity_id: light.flur_unten
        domain: light
      - condition: numeric_state
        entity_id: light.flur_unten
        value_template: '{{ state.attributes.brightness }}'
        below: 65
action:
  - type: turn_on
    device_id: f3d47241032a11eba506cdbdcb522cb7
    entity_id: light.flur_unten
    domain: light
    brightness_pct: 100
mode: single

Error message:

Logger: homeassistant.helpers.condition
Source: helpers/condition.py:234
First occurred: 10:26:26 (1 occurrences)
Last logged: 10:26:26
Value cannot be processed as a number: <state light.flur_unten=off; is_deconz_group=False, friendly_name=Flur unten, supported_features=41 @ 2020-12-21T10:18:29.779826+01:00> (Offending entity: )

What am I missing?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>