Haunted bulb, how to debug

Hi,
i have esphome (libretuya, pre-merge version to be specific) bulb. I have it configured in adaptive lighting configuration like this

lights:
  - light.tuya_bulb_5ch_002_light_rgbww
interval: 90
transition: 45
initial_transition: 3
min_brightness: 25
max_brightness: 35
min_color_temp: 4000
max_color_temp: 6000
prefer_rgb_color: false
sleep_brightness: 18
sleep_rgb_or_color_temp: rgb_color
sleep_color_temp: 3000
sleep_rgb_color:
  - 255
  - 191
  - 0
sleep_transition: 1
transition_until_sleep: false
sunrise_time: null
min_sunrise_time: null
max_sunrise_time: null
sunrise_offset: 0
sunset_time: null
min_sunset_time: null
max_sunset_time: null
sunset_offset: 0
brightness_mode: tanh
brightness_mode_time_dark: 900
brightness_mode_time_light: 3600
take_over_control: true
detect_non_ha_changes: false
autoreset_control_seconds: 0
only_once: false
adapt_only_on_bare_turn_on: false
separate_turn_on_commands: false
send_split_delay: 0
adapt_delay: 2
skip_redundant_commands: false
intercept: true
multi_light_intercept: true
include_config_in_attributes: true
name: pracovna_adaptive_light

I have tri state input_select helper with values “off”, “auto”, “on”.
When i press off, it switches off the light
When i press “auto” it enables adaptive lighting.
When i press “on”, it disables adaptive lighting and sets brightness to 80% and cold white output.

It worked well for year or so. Now, it behaves strangely.

When i press “on”, it sets the brightness and disables adaptive lighting, but the bulb returns to 25% (which is minimum for adaptive lighting) after some time. It happens even when i remove this bulb from adaptive lighting intergration. It returns to 25% even when i changed the minimum to other value, so i think, it’s not probably caused by adaptive lighting intergration.

I don’t know, how to debug this. Any other bulb i have does not behave like this (i use this tri state switch+adaptive lighting for most of my lights)

When i change tristate button to auto, it emits this call_services

event_type: call_service
data:
  domain: light
  service: turn_on
  service_data:
    brightness_pct: "80"
    transition: "5"
    kelvin: 6000
    entity_id: light.tuya_bulb_5ch_002_light_rgbww
origin: LOCAL
time_fired: "2023-12-13T18:43:22.314449+00:00"
context:
  id: 01HHJ7V6JAM5R7ZTA3JH40TF5G
  parent_id: null
  user_id: d0c6091c4ad341168cb3c056406642a4
event_type: call_service
data:
  domain: switch
  service: turn_off
  service_data:
    entity_id:
      - switch.adaptive_lighting_sleep_mode_pracovna_adaptive_light
      - switch.adaptive_lighting_pracovna_adaptive_light
origin: LOCAL
time_fired: "2023-12-13T18:43:22.241176+00:00"
context:
  id: 01HHJ7V6G0KZKGQJMBEM9DB9FJ
  parent_id: null
  user_id: d0c6091c4ad341168cb3c056406642a4

which is what i expect, but then this event happens

event_type: call_service
data:
  domain: light
  service: turn_on
  service_data:
    entity_id: light.tuya_bulb_5ch_002_light_rgbww
    transition: 45
    brightness: 64
    color_temp_kelvin: 4000
origin: LOCAL
time_fired: "2023-12-13T18:44:30.756216+00:00"
context:
  id: 01HHJ7X9D0:al:OBZG:ntrv:YC
  parent_id: null
  user_id: null

I just don’t know, what is it generated by

Hi,
seems like it fixed itself when i upgraded my hass instalation to next version. There was probably something stuck