Thanks! I didn’t see this but after messing around for most of the day I figured it out. Exhausted but I’ll post my config at some point. Much appreciated for the starting guide though, was extremely helpful!
Just follow up here is my config for lights, switches, sensors, binary sensors, locks and covers. I realized this morning that transitions aren’t working so I’m going to have to modify my lights a bit to get them to work (looks like I’ll be going for the JSON format), but figured this might help someone else. The brightness control works just fine.
And these are the automations running on the slave instance (note I have the binary sensor turn off because it was spamming messages. I think I fixed that but I left the automation in as I don’t think it hurts):
I’ve hit a wall and maybe you can help @RobDYI. Can you check out MQTT Light/Templating Help . I’m not trying to auto-generate the lights (i may try to do that eventually but i just wanted to get things working) but I can’t seem to get transitions and brightness to work.
could anyone confirm what config entries theyve put on the slave and what on the master - I sort of get it working but then my master instance goes nuts and creates hundreds of entries for each slave entity and almost kills the machine, e.g.
I think the problem might be that you have discovery on, on the master. (the HA that provides the sensors / switches to the slave) If you don’t want the master to populate any sensors / switches from mqtt config, then set discovery to false or set the discovery prefix to something different than the slave.
Thanks for replying so quickly @RobDYI
Maybe I’m doing this back to front. I have sensors and switches on the slave that I want to be visible and able to be switched on/off from the master.
I don’t want the slave to see any entities that exist on the master.
I have no mqtt config on the master, as I’m using this broker https://www.home-assistant.io/addons/mosquitto/ and I’ve set the integration not to add new devices:
you can go to the configuration menu on the front end to delete all the entities that are repeated or erase your storage folder if you can to start fresh.
Can you share the latest version of this automation? Do you also have it shared on Github? Because I’m not sure if I use pieces of it or complete.
For me trying to use a switch function on the master doesn’t work. It is loading correctly the values from slave to master.
And do you have the brightness function now also included?
Is there no way in which the MQTT discovery messages are automatically generated ? I want to deploy a ‘remote’ zwave network on a rpi. All entities can be published to the master HA, and should be controllable. I’d hate to modify the config everytime I add a new device
What kind of information does your zwave device reveal about itself?
For example, assume I just added a new device. It reports nothing about itself other than its name and current state. Guess what I added.
That’s the challenge of what you are proposing: to publish a discovery payload, containing information about the device, to a specific discovery topic for a device that reveals next to nothing about itself.
On the other hand, if the device reveals a great deal about itself, then that data can be used to generate discovery information. The challenge then becomes detecting new devices, selecting appropriate data and reformatting it for use with Home Assistant’s MQTT Discovery.
I want to turn on my Hall lights when the door opens after sunset.
and when the door is closed again to turn off the lights after 3 minutes.
The automation won’t allow me the for: " 00:03:00" statement.
What am i doing wrong?
- alias: Turn on hall light when door opens
trigger:
platform: mqtt
topic: shellies/shellydw2-front/sensor/state
payload: "open"
condition:
condition: state
entity_id: sun.sun
state: below_horizon
action:
service: light.turn_on
entity_id: light.hal
id: 83a95c0f089849b2b4701024949c10ed
- alias: Turn off Hall light after 3 minutes
trigger:
platform: mqtt
topic: shellies/shellydw2-front/sensor/state
payload: "close"
for: "00:03:00"
action:
service: light.turn_off
entity_id: light.hal
id: 9d3a15d53db045a28c122e30c7b01008