here’s my automation code which uses an Xiamoi contact sensor and a wemo light both connected through zigbee2mqtt I also have some other conditions based on light level and motion.
- id: '1526613924124'
alias: Garage Light On
trigger:
- entity_id: binary_sensor.contactsensor
from: 'off'
platform: state
to: 'on'
condition:
- below: '5'
condition: numeric_state
entity_id: sensor.wirelesstag_garage_light
- condition: state
entity_id: sensor.aeotec_zw100_multisensor_6_burglar_2
state: '0'
- condition: state
entity_id: light.0x94103ef6bf428aad
state: 'off'
action:
- data:
entity_id: light.0x94103ef6bf428aad
service: light.turn_on
Yeah, don’t do that.
The idea is MQTT is in the background handling the states/data in the background.
You want to use the HA entity state change to do the automation.
That makes a lot more sense now! I was over-complicating the MQTT side of it (still new to it) and forgetting the normal HA triggers
- alias: Door Open - Light On
trigger:
platform: state
entity_id: binary_sensor.xds1bedroom
from: 'off'
to: 'on'
action:
service: light.turn_on
entity_id: light.bedside
Awesome, thanks for the tips guys.
Loving that I can now add Zigbee devices to HA without having a hub.
Ive had a box of Xiaomi stuff that Ive collected during sales just sat doing nothing after realizing I needed the Hub, then had issues with delays and pairings dropping off when using the Hub which can all now be put to some use
Hello, may I ask what do you think about Zigate One Zigbee gateway to rule them all? ? Why are you guys creating a custom hardware when there seems to be a comercial product addressing this? (please don’t kill the messenger if I’m missing something very obvious)
Few reasons.
1). ZiGate is 40EU. This is 10USD. (excluding debugger)
2). ZiGate is hard to find & order (I just found kickstarter). The other keys are everywhere. AliExpress, Ebay, Amazon.
3). It’s in French???
Hi,
followed this for a while and just ordered the necessary parts a week ago. The Xiaomi Sensors are priced to good compared to z-wave sensors available in my country.
Anyway since my HA server is on one side of my flat, i will definatly need a zigbee router in the middle to cover my whole apartment.
Can somebody confirm that the Osram Smart+ Plug (AB3257001NJ) will work for this or knows an alternive EU/Germany Plug? A LED Light as Router or the xiaomi power plugs wont work for me.