home assistant cover via mqtt



  • Hi,
    Can someone help with moving from dynamic cfg ( mysensor discovery ) to static mqtt cover cfg

    mysensors:
        gateways:
          - device: 'mqtt'
            topic_in_prefix: 'mysensors-in'
            topic_out_prefix: 'mysensors-out'
            persistence_file: '/opt/homeassistant/mysensors.json'
        optimistic: false
        persistence: true
        retain: true
        version: '2.3'
    

    cover.yaml:

      - platform: mqtt
        name: "${cover.name}"
        command_topic: "mysensors-in/${nodeid}/${cover.id}/1/0/3"
        state_topic: "mysensors-in/${nodeid}/${cover.id}/1/0/3"
        qos: 0
        retain: true
        position_open: 100
        position_closed: 0
    

    mysensors.json

    {
        "0": {
            "sensor_id": 0,
            "children": {
                "1": {
                    "id": 1,
                    "type": 5,
                    "description": "",
                    "values": {
                        "30": "1",
                        "3": "0",
                        "31": "1"
                    }
                },```
    ...
    
    how should look currect
    command_topic
    state_topic
    set_position_topic
    position_topic

 

259
Online

8.7k
Users

9.5k
Topics

99.9k
Posts