First off - Thanks for the new Tasmota integration - my config file is looking cleaner now I can do more in the UI. however I’ve possibly come across an issue when I separate buttons from relays (I’ve got a “button box” on my desk (see pic) that’s got 3* buttons and 3* LEDs connected
. Using a combination of switchmode5 and SetOption114, I’m getting the various combinations of button presses etcMQTT traffic:
cmnd/tasmota_CF33C6/Status (null)
stat/tasmota_CF33C6/STATUS {"Status":{"Module":18,"DeviceName":"Buttonbox","FriendlyName":["Red","Amber","Green"],"Topic":"tasmota_CF33C6","ButtonTopic":"","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[5,5,5,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
stat/tasmota_CF33C6/RESULT {"Button3":{"Action":"TRIPLE"}}
but they don’t appear automatically with the integration, so I had to add them to configuration.yaml:
sensor:
- platform: mqtt
name: Buttonbox Red
state_topic: "stat/tasmota_CF33C6/RESULT"
value_template: "{{value_json.Button1.Action }}"
unique_id: bb_red
- platform: mqtt
name: Buttonbox Amber
state_topic: "stat/tasmota_CF33C6/RESULT"
value_template: "{{value_json.Button2.Action }}"
unique_id: bb_amb
- platform: mqtt
name: Buttonbox Green
state_topic: "stat/tasmota_CF33C6/RESULT"
value_template: "{{value_json.Button3.Action }}"
unique_id: bb_grn
and the state is “sticky” so I can’t toggle based on something like
- id: '1608264215030'
alias: Red Button SINGLE
description: ''
trigger:
- platform: state
entity_id: sensor.buttonbox_red
to: SINGLE
condition: []
action:
- type: toggle
device_id: 03a9ff3643cdc26cb900cb68cddba3fd
entity_id: switch.fountain
domain: switch
mode: single
without changing to another intermediate state. I tried setting expire_after: 2
but that sets all 3 buttons to unavailable rather than an “idle” state (and still keeps the last known value of all 3 buttons when the device republishes any of the button presses)
A quick glance at the docs seems like https://www.home-assistant.io/integrations/device_trigger.mqtt/ is what I want, but how can this be integrated into Tasmota?
(pic of button box - I’ll leave the rats nest wiring up to your imaginations…