Discovery and Mysensors (via MQTT)

Hello,
I’m new to HASS and moving from OpenHAB2. Actually I like it very, but need to learn a little bit som stuff better.
I’ve a MySensors network that works, more or less, fine with HomeAssistant.
The configured devices are actually added manually, in example like this:

- platform: mqtt
 name: node30_child01
 command_topic: "mygateway1-in/30/1/1/0/2"
 state_topic: "mygateway1-out/30/1/1/0/2"
 payload_on: 1
 payload_off: 0
 state_on: 1
 state_off: 0
 optimistic: true
 retain: true
 qos: 2

Now, I’ve seen the discovery uses it’s own naming convention, which is partially configurable, via GUI, with customization. But some settings are not configurable from GUI.
My goal is to try moving away from 100% cli configuration and starting to use the interface. Parameters like ‘friendly_name’, ‘icon’, ‘assumed_state’ are settings I can set on customize, but not others like ‘payload_’, 'state_’, ‘optimistic’, ‘retain’.
How to deal with them? Suggestions?

I would like to not disable the discovery from HomeAssistant, (actually my mysensors devices are configred twice, one manually and the second by auto-discovery, it means twice the data in the sqlite db!). So the same way I would like to set it up clean and correct.

Any suggestions?

Many thanks!

Simon

No ideas or suggestions ? :innocent:

Thanks!!!

I set my MySensors MQTT nodes up manually a couple of years ago because the MySensors component didn’t work well then, and I haven’t changed since. So I have no idea if the auto-discovery works or not.

But you need to pick one way or the other - just delete the configuration you don’t want from your yaml.

Hello @gpbenton,
Ok, that makes sense. What I’m in doubt with the discovery setup, which is valid for mqtt as well as for everything else, is the following:

  • a discovery system is able to find new devices, in case of mqtt/mysensors it creates devices per node/child base
  • via GUI I’m able to add customization to it, i.e. ‘friendly_name’, ‘icon’, ‘assumed_state’…

Until here ok.
What about other settings I’ve asked before? I mean payload*, 'state* ’, ‘optimistic’, ‘retain’?
Should I let discover the device from the discover system, change the informations via GUI (customization) and then add the missing parameters (or change the default ones) from the cli?
I know I could define all from cli, but I would like to know the flow to follow trying to stay as near as possible to a setup based on the webGUI (even if I was always a cli-guy :wink: )

Any hint is well appreciated!!
Thanks a lot!

Simon