Hi guys,
i’ve had some lights working through MQTT for a while and with the new mqtt format I changed to code to suit but now I’m getting a error message in the logs about the Schema line and i can’t find any info about it.
Will i be ok to delete this line or should i edit it to something else ?
ERROR (MainThread) [homeassistant.config] Invalid config for [sensor]: [schema] is an invalid option for [sensor]. Check: sensor->schema. (See /config/packages/h801_lights.yaml, line 152).
The sensor code …
mqtt:
sensor:
- name: "Fish Tank LED"
schema: json
unique_id: fish_tank_leds
icon: "mdi:led-strip-variant"
state_topic: "LedStrip/Fish_tank_led/rgb/json_status"
command_topic: "LedStrip/Fish_tank_led/rgb/json_set"
availability_topic: "LedStrip/Fish_tank_led/active"
brightness: true
rgb: true
effect: true
effect_list: ["color_mode", "HDMI"]
qos: 0
optimistic: false
Steveuk:
The sensor code …
I believe you are saying that you have an MQTT light. So why are you coding it as an MQTT SENSOR?
you should change to this:
mqtt:
light:
- name: "Fish Tank LED"
.
.
Oh yeah of course i just copied and pasted from another configuration and didn’t spot that part.
thanks for that
1 Like
Hi i changed to light instead and the warnings have gone now and the lights do work but there is this message in the logs do you know what it means ?
Manually configured MQTT light(s) found under platform key 'light', please move to the mqtt integration key, see https://www.home-assistant.io/integrations/light.mqtt/#new_format
finity
June 5, 2022, 10:04am
5
post your new latest config.
mqtt:
light:
- name: "Fish Tank LED"
schema: json
unique_id: fish_tank_leds
icon: "mdi:led-strip-variant"
state_topic: "LedStrip/Fish_tank_led/rgb/json_status"
command_topic: "LedStrip/Fish_tank_led/rgb/json_set"
availability_topic: "LedStrip/Fish_tank_led/active"
brightness: true
rgb: true
effect: true
effect_list: ["color_mode", "HDMI"]
qos: 0
optimistic: false
- name: "White"
schema: json
state_topic: "LedStrip/Fish_tank_led/white/json_status"
command_topic: "LedStrip/Fish_tank_led/white/json_set"
availability_topic: "LedStrip/Fish_tank_led/active"
brightness: true
color_temp: true
qos: 0
optimistic: false
- name: "Combined"
schema: json
state_topic: "LedStrip/Fish_tank_led/combined/json_status"
command_topic: "LedStrip/Fish_tank_led/combined/json_set"
availability_topic: "LedStrip/Fish_tank_led/active"
brightness: true
color_temp: true
rgb: true
effect: true
effect_list: ["white_mode", "color_mode", "both_mode", "HDMI"]
qos: 0
optimistic: false
finity
June 5, 2022, 10:12am
7
I’m not sure. It looks correct as far as I can see.
Are you sure those are the only mqtt lights you have configured?
1 Like
Not that i’m aware of i’ll check through my files.
cheers
1 Like
roschi02
(Robin)
June 7, 2022, 11:52am
9
I have zigbee2mqtt installed so i also had to change the zigbee2mqtt.yaml from
sensor:
# Sensor for monitoring the bridge state
- platform: mqtt
name: Zigbee2MQTT Bridge state
state_topic: "zigbee2mqtt/bridge/state"
icon: mdi:router-wireless
# Sensor for Showing the Zigbee2MQTT Version
- platform: mqtt
name: Zigbee2MQTT Version
state_topic: "zigbee2mqtt/bridge/config"
value_template: "{{ value_json.version }}"
icon: mdi:zigbee
# Sensor for Showing the Coordinator Version
- platform: mqtt
name: Coordinator Version
state_topic: "zigbee2mqtt/bridge/config"
value_template: "{{ value_json.coordinator }}"
icon: mdi:chip
# Switch for enabling joining
switch:
- platform: mqtt
name: "Zigbee2MQTT Main join"
state_topic: "zigbee2mqtt/bridge/config/permit_join"
command_topic: "zigbee2mqtt/bridge/config/permit_join"
payload_on: "true"
payload_off: "false"
to
mqtt:
sensor:
# Sensor for monitoring the bridge state
- name: Zigbee2MQTT Bridge state
state_topic: "zigbee2mqtt/bridge/state"
icon: mdi:router-wireless
# Sensor for Showing the Zigbee2MQTT Version
- name: Zigbee2MQTT Version
state_topic: "zigbee2mqtt/bridge/config"
value_template: "{{ value_json.version }}"
icon: mdi:zigbee
# Sensor for Showing the Coordinator Version
- name: Coordinator Version
state_topic: "zigbee2mqtt/bridge/config"
value_template: "{{ value_json.coordinator }}"
icon: mdi:chip
# Switch for enabling joining
switch:
- name: "Zigbee2MQTT Main join"
state_topic: "zigbee2mqtt/bridge/config/permit_join"
command_topic: "zigbee2mqtt/bridge/config/permit_join"
payload_on: "true"
payload_off: "false"
2 Likes
Thanks yeah that’s how I have it now.
Although I’m trying to change most things into the packages integration soi can just have 1 yaml file for the different kind of sensors.
1 Like