sidoh / esp8266_milight_hub

Replacement for a Milight/LimitlessLED hub hosted on an ESP8266
MIT License
931 stars 219 forks source link

Strange error in HA #735

Closed poudenes closed 1 year ago

poudenes commented 2 years ago

Hi All,

For long time all my lights working perfect. But at a certain moment i see those errors pop up in the error log. I dont know how to solve this. Tried many things. Maybe HA has changes some things i dont know.

(it is 1 line but its always more then 1. But show one)

2021-08-10 06:23:54 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'Milight_Hub/states/0xAAAB/rgb_cct/1': '{"status":"ON","brightness":"255"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 299, in state_received
    if values["state"] == "ON":
KeyError: 'state'

- name: "Bedroom 5"
  command_topic: "Milight_Hub/0xAAAB/rgb_cct/1"
  state_topic: "Milight_Hub/states/0xAAAB/rgb_cct/1"
    platform: mqtt
    schema: json
    color_temp: true
    rgb: true
    brightness: true
    effect: true
    qos: 1
    optimistic: true
    retain: false
    availability_topic: "Milight_Hub/client_status"
    payload_available: "connected"
    payload_not_available: "disconnected"
    effect_list:
      - "night_mode"
      - "white_mode"
      - "0"
      - "1"
      - "2"
      - "3"
      - "4"
      - "5"
      - "6"
      - "7"
      - "8"
poudenes commented 2 years ago

'{"status":"ON","brightness":"255"}'

status is ON and on. Can that be the problem?

garmck commented 2 years ago

There was a breaking change for MQTT Light integration in April. https://www.home-assistant.io/blog/2021/04/07/release-20214/#breaking-changes

https://github.com/home-assistant/core/pull/47993 @sidoh some features are being deprecated in 2021.10 - will these impact the MQTT JSON currently being used? Looks like color_temp will no longer be used.

poudenes commented 2 years ago

https://github.com/sidoh/esp8266_milight_hub/issues/723

Posted already things that will change....

poudenes commented 1 year ago

Any news about this? :)