Duplicate integration settings should be found in configuration check

I made a mistake with a configuration entry and I cannot think of a reason that it would be useful to be able to this. I created duplicate lines within the same mqtt entry for the payload_on setting with two different values. It would make sense to detect duplicate settings for a given integration in the configuration check for the case that only one is possible. The result of the switch configuration below is that it showed as always β€œOn”, for either state of the switch.

- platform: mqtt
  command_topic: "home/switch/cmnd/fan/power"
  state_topic: "home/switch/stat/fan/POWER"
  name: crawl_fan
  payload_on: "ON"
  payload_on: "OFF"
  qos: 2
  retain: true

Well, the problem is, it is actually valid.

However, it does cause a warning in the logs.

I will have to look more closely at the logs. Thank you!

1 Like