RoyOltmans / somfy_esp8266_remote_arduino

Somfy ESP8266 Remote 433.24 RTS
43 stars 8 forks source link

how to create control elements #2

Open chris1601 opened 3 years ago

chris1601 commented 3 years ago

Hi there,

I stumbled upon your git by searching for a way to control my Somfy awning. And yours looks to be the promising of all i found. While waiting for my crystal to arrive I just can't figure out where to put the code ( - platform: mqtt .... ) in Home Assistant. Could you please clarify it in the documentation how to create a control card or something similar?

Thanks a lot for your effort

RoyOltmans commented 10 months ago

Sorry for the real late response, but lets have a look.

I prefer separating the every configuration block in a separate file You need to edit the configuration.yaml add the following line: mqtt: !include mqtt.yaml

Now you create the file mqtt.yaml in the same folder as the configuration.yaml

then copy the configuration below off course fill in you Device ID at the [DEVICE ID YOU USE]

  switch:
   -  command_topic: "home/nodemcu/somfy/[DEVICE ID YOU USE]"
      name: "Somfy Shutter"
      availability_topic: "home/nodemcu/somfy/[DEVICE ID YOU USE]/status"
      state_topic: "home/nodemcu/somfy/[DEVICE ID YOU USE]/state"
      qos: 1
      payload_open: "u"
      payload_stop: "s"
      payload_close: "d"
      retain: true

Then you should have the device available in HA and you can make a card based on the commands.