I have an MQTT switch setup for my gaming pc and am controlling it from lovelace quite happily, the issue I’m having though is home assistant seems to be sending commands automatically without my interaction. I.e. my pc randomly turned on in the middle of the night.
I’m not sure if its reactive to the a state change, or whether its trying to restore the state from what homeassistant thinks it should be.
Ideally I would only like HA to send commands when I press the lovelace button or if I write my own automation.
This is my config:
- platform: mqtt
state_topic: “stat/unlockideas/pc/switch”
command_topic: “stat/unlockideas/pc/switch/cmd”
availability_topic: “stat/unlockideas/pc/switch/avail”
name: “Gaming PC”
unique_id: “pc_gaming1”
payload_on: “ON”
payload_off: “OFF”
payload_available: “online”
payload_not_available: “offline”
optimistic: false
qos: 1
retain: false
Thanks in advance!