The script to fix my tasmota 6.6 lights :
scripttasmotalights:
sequence:
# - service: mqtt.publish
# data:
# retain: true
# topic:
# payload:
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/689626_LI_1/config
payload: '{"name":"lichtbovenkleineslaapkamer","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"689626_LI_1","device":{"identifiers":["689626"]},"~":"lichtbovenkleineslaapkamer/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/C7D5C9_LI_1/config
payload: '{"name":"lichtbadkamer","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"C7D5C9_LI_1","device":{"identifiers":["C7D5C9"]},"~":"lichtbadkamer/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/688F47_LI_1/config
payload: '{"name":"lichtbovenoudeslaapkamer ","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"688F47_LI_1","device":{"identifiers":["688F47"]},"~":"lichtbovenoudeslaapkamer/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/68ADCE_LI_1/config
payload: '{"name":"lichtbovengang","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"68ADCE_LI_1","device":{"identifiers":["68ADCE"]},"~":"lichtbovengang/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/68A930_LI_1/config
payload: '{"name":"lichtzitkamerruit","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"68A930_LI_1","device":{"identifiers":["68A930"]},"~":"lichtzitkamerruit/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/D933EC_LI_1/config
payload: '{"name":"lichtboventrapgat","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"D933EC_LI_1","device":{"identifiers":["D933EC"],"connections":[["mac","60:01:94:D9:33:EC"]]},"~":"lichtboventrapgat/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/B33669_LI_1/config
payload: '{"name":"lichtvooraangrotelichten","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"B33669_LI_1","device":{"identifiers":["B33669"]},"~":"lichtvooraangrotelichten/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/B391BE_LI_1/config
payload: '{"name":"lichtvooraankleinelichten","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"B391BE_LI_1","device":{"identifiers":["B391BE"]},"~":"lichtvooraankleinelichten/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/B36127_LI_1/config
payload: '{"name":"lichtvooraandeur","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"B36127_LI_1","device":{"identifiers":["B36127"]},"~":"lichtvooraandeur/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/68BD1D_LI_1/config
payload: '{"name":"lichtzitkamermuur","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"68BD1D_LI_1","device":{"identifiers":["68BD1D"]},"~":"lichtzitkamermuur/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/AB019C_LI_1/config
payload: '{"name":"lichtbovenschuindak","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"AB019C_LI_1","device":{"identifiers":["AB019C"]},"~":"lichtbovenschuindak/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/68BF3C_LI_1/config
payload: '{"name":"lichtkeuken","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"68BF3C_LI_1","device":{"identifiers":["68BF3C"]},"~":"lichtkeuken/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/BA335F_LI_1/config
payload: '{"name":"lichtbovenoverloop","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"BA335F_LI_1","device":{"identifiers":["BA335F"]},"~":"lichtbovenoverloop/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/A9BBEF_LI_1/config
payload: '{"name":"lichtbuitenvoordeur","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"A9BBEF_LI_1","device":{"identifiers":["A9BBEF"]},"~":"lichtbuitenvoordeur/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/68AF8A_LI_1/config
payload: '{"name":"lichteetkamer","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"68AF8A_LI_1","device":{"identifiers":["68AF8A"]},"~":"lichteetkamer/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/AA8028_LI_1/config
payload: '{"name":"lichtwaskot","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"AA8028_LI_1","device":{"identifiers":["AA8028"]},"~":"lichtwaskot/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/B335B0_LI_1/config
payload: '{"name":"lichtslaapkamervooraan","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"B335B0_LI_1","device":{"identifiers":["B335B0"]},"~":"lichtslaapkamervooraan/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/AA4432_LI_1/config
payload: '{"name":"lichtslaapkamervooraan2","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"AA4432_LI_1","device":{"identifiers":["AA4432"]},"~":"lichtslaapkamervooraan2/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/D933EC_LI_1/config
payload: '{"name":"lichtboventrapgat","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"D933EC_LI_1","device":{"identifiers":["D933EC"],"connections":[["mac","60:01:94:D9:33:EC"]]},"~":"lichtboventrapgat/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/B391BE_LI_1/config
payload: '{"name":"lichtvooraankleinelichten","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"B391BE_LI_1","device":{"identifiers":["B391BE"]},"~":"lichtvooraankleinelichten/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/B33669_LI_1/config
payload: '{"name":"lichtvooraangrotelichten","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"B33669_LI_1","device":{"identifiers":["B33669"]},"~":"lichtvooraangrotelichten/"}'
- service: mqtt.publish
data:
retain: true
topic: homeassistant/light/AA4432_LI_1/config
payload: '{"name":"lichtslaapkamervooraan2","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","stat_val_tpl":"{% raw %}{{value_json.POWER}}{% endraw %}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"AA4432_LI_1","device":{"identifiers":["AA4432"]},"~":"lichtslaapkamervooraan2/"}'