Philips Hue - light does not go on percentage set in the automation

Hi!

I’ve been having some issues for a good while now with my Philips hue lights which I integrated in Home Assistant with the Hue Bridge.I have an automation which activates the light in my toilet to 75% whenever there is movement in the toilet via a Neo Coolcam motion sensor.
This is the automation;

- id: '1587980860498'
  alias: 'WC: Overdag'
  description: ''
  trigger:
  - device_id: 2d5366ed4a3d4dedbaa4023c62fa2f2a
    domain: binary_sensor
    entity_id: binary_sensor.shenzhen_neo_electronics_co_ltd_battery_powered_pir_sensor_v2_sensor
    platform: device
    type: turned_on
  condition:
  - above: '5'
    condition: numeric_state
    entity_id: sensor.hue_motion_sensor_1_light_level
  action:
  - scene: scene.wc_overdag

Scene:

- id: '1598808127595'
  name: WC Overdag
  entities:
    light.wc_2:
      brightness: 191
      color_temp: 366
      friendly_name: WC
      max_mireds: 454
      min_mireds: 153
      state: 'on'
      supported_features: 43

The problem that I am having is once the automation activates, the lights goes on to 1% instead of 75% HA will show it is 75%, but the actual percentage (via Hue app or Apple Home app) shows 1% This happens every now and then and I really don’t know why.

It’s not only in the toilet but also happens with automations which includes my living room lights. They also do not turn on on the correct percentage. I’ve tried different ways of turning the light on, for example via a scene, just the devices separately or via a script. It all does the same.

Home Assistant 0.114.4 (have updated a few times before, issue stays)
Running Ubuntu 19.10 with a python virtual environment.

Bump, is this the correct section?

Why is your scene attempting to set options like friendly_name and supported_features?

You are overdoing things in the scene config. This is enough if you only want to set the light to 75%:

  - name: WC Overdag
    entities:
      light.wc_2:
        state: on
        brightness: 191

You can also use brightness_pct instead of brightness and specify 75 instead of 191:

  - name: WC Overdag
    entities:
      light.wc_2:
        state: on
        brightness_pct: 75

The other attributes you are trying to set are capabilities/information for the light entity.

Try the above out by activating the scene manually in developer tools.

Since your scene is very simple, you can specify the action directly in the automation without calling a scene:

  action:
    service: light.turn_on
    entity_id: light.wc_2
    data:
      brightness_pct: 75

I have no idea, I’ve configured this from the GUI, so HA did this.

I also tried just having the WC entity in the automation, but the same problem occurs.
Again, I am configuring the automation via the GUI. I will put your code in there manually to see how that goes. Will let you know! Thank you both@

I just tried it and can confirm the Scene Editor includes all of those options. However, in my case, the resulting scene works correctly. It turns on a Philips Hue Color light to the desired brightness level and color. If I manually adjust the bulb’s brightness and then activate the scene, the brightness changes to whatever is specified by the scene.

It doesn’t happen 100% of time, more like 5%. It happens rarely, stillm very annoying. I changed the automation now and will keep an eye on it :slight_smile: