Turn on the light and it will automatically adjust the brightness to 100%?

Hey guys!
I have already link a Yeelight into HomeAssistant and it runs successfully.I can turn on/off the light and adjust the brightness and color on HA web pages.

And then I connect the HA into HomeKit via homebridge. It works fine.I can control the light in my Home App on iPhone. And the problem is when I turn on the light, the brightness of the light will automatically adjust to 100%, but when I turned off last time the brightness was only 54%!

I repeat the similar scene on HA web pages, it works normally. It wouldn’t adjust the brightness to 100%.

Where can the problem be?

What service YAML are you using to turn on the light? A simple light.turn_on? Post your code. Could be a weirdness with the Yeelight component. Do you have anything else that’s supported a light?

If you are exposing the light directly to HomeKit and HomeKit only sends a TURN ON command to HA, the light will turn on with the previous brightness level.
Maybe you could add a automation that turns the brightness of the light to 100% when its state goes from ‘off’ to ‘on’.

This post should be moved to the Configuration section, since this is not a third party issue/question. The behaviour is the same on all “light” components.

I think the problem is that his light adjusts to 100 percent already, but he wants it to adjust to the last known brightness.

You’re right! I’ve read it in reverse :smiley:
Then its probably an issue with the HomeKit integration? With Alexa, for example, it turns on the latest brightness.

HomeKit integration works well for me (I have 2 Yeelight which I turn on/toggle) and it is always with brightness 50%.

Here are my code in configuration.yaml:
light:

  • platform: yeelight
    devices:
    192.168.21.30:
    name: Office Light
    transition: 1000
    use_music_mode: True #(defaults to False)
    save_on_change: True #(defaults to True)

Which version of hassbian are you using?

What code are you using to turn it on? (also - use preformatted text when posting YAML)

Latest, but I just noticed yesterday that after all I have the same issue has you do.

Sorry for the confusion.

thanks for reply.

so do you have the same issue as I do? It’s really odd. In HA web pages when I turn on the light and its brightness wouldn’t adjust to 100% automatically.

Where can the problem be? /cry/cry

All the code I use are as follows

In configuration.yaml:

light:
  - platform: yeelight
    devices:
      192.168.1.30:
        name: Office Light
        transition: 1000
        use_music_mode: True #(defaults to False)
        save_on_change: True #(defaults to True)

In config.json:

{
    "bridge": {
        "name": "homebridge",
        "username": "B8:27:EB:4F:DF:18",
        "port": 51828,
        "pin": "123-45-678"
    },
    
    "platforms": [
  {
    "platform": "HomeAssistant",
    "name": "HomeAssistant",
    "host": "http://192.168.1.24:8123",
    "password": "simonnnn",
    "supported_types": ["fan", "garage_door", "input_boolean", "light", "lock", "media_player", "rollershutter", "scene", "switch"]
  }
    ]
}

All the code I use are as follows

In configuration.yaml:

light:
  - platform: yeelight
    devices:
      192.168.1.30:
        name: Office Light
        transition: 1000
        use_music_mode: True #(defaults to False)
        save_on_change: True #(defaults to True)

In config.json:

{
    "bridge": {
        "name": "homebridge",
        "username": "B8:27:EB:4F:DF:18",
        "port": 51828,
        "pin": "123-45-678"
    },
    
    "platforms": [
  {
    "platform": "HomeAssistant",
    "name": "HomeAssistant",
    "host": "http://192.168.1.24:8123",
    "password": "simonnnn",
    "supported_types": ["fan", "garage_door", "input_boolean", "light", "lock", "media_player", "rollershutter", "scene", "switch"]
  }
    ]
}

This doesn’t show what service call you’re using to turn on the light. Is it a simple light.turn_on?

Hi all! I am facing exactly the same issue with the HomeKit addon. There are two weird behaviors:

  1. I have grouped two of the three lights. Either by toggling the group on Home App or the individual lights the brightness allways turns to 100%.

  2. The brightness slider on the home app is not “stable”. What I mean is that when I try to I turn the brightness from 50% to 25%, as soon as I raise my finger, the brightness might get back to 50%, or set to 49%, or 27%. It is random and very weird.

Switching everything directly via HA works great.

my lights.yaml:

- platform: yeelight
  devices:
    192.168.1.4:
      name: Living Room Light 1
      transition: 400
      use_music_mode: True
      save_on_change: False
    192.168.1.5:
      name: Living Room Light 2
      transition: 400
      use_music_mode: True
      save_on_change: False
    192.168.1.3:
      name: Bedroom Light
      transition: 400
      use_music_mode: True
      save_on_change: False

- platform: group
  id: living_room_lights
  name: Living Room Lights
  entities:
  - light.living_room_light_1
  - light.living_room_light_2

my homekit configuration (I haven’t done anything with lights):

homekit:
  entity_config:
    media_player.living_room_tv:
      feature_list:
        - feature: on_off
        - feature: play_pause
        - feature: play_stop
        - feature: toggle_mute