JoeyVG
(Joey)
September 3, 2019, 6:35pm
1
Hi people,
im trying to make my first automation with zigbee2mqtt (cc2531), but in my case it isn’t working.
Can anybody tell my what im doing when you see this pictures?
Maybe its something really simple but I can’t find it.
I am using this sensor: https://www.zigbee2mqtt.io/devices/MCCGQ11LM.html and this bulb: https://www.zigbee2mqtt.io/devices/LED1622G12.html
Thanks in advance.
Joey
Tinkerer
(aka DubhAd on GitHub)
September 3, 2019, 7:37pm
2
Behind those pictures is YAML, and it’s much easier to work with that to help you.
That said, the picture with light.turn_on
shows you’re using entities
. That’s wrong, see https://www.home-assistant.io/components/light#service-lightturn_on
JoeyVG
(Joey)
September 3, 2019, 8:03pm
3
automation.yaml
- id: '1567540314982'
alias: New automation
trigger:
- entity_id: binary_sensor.0x00158d0002c9e43c_contact
from: 'false'
platform: state
to: 'true'
condition: []
action:
- data:
entity_id: light.0x000b57fffea832da_light
service: light.turn_on
configuration zigbee2mqtt
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: #deleted
user: mqtt
password: mqtt
serial:
port: /dev/ttyACM0
advanced:
pan_id: 6754
channel: 11
network_key:
#deleted
availability_blacklist: []
ban: []
whitelist: []
queue: {}
devices.yaml
'0x00158d0002b6ee02':
friendly_name: '0x00158d0002b6ee02'
retain: false
'0x00158d0002b609b5':
friendly_name: '0x00158d0002b609b5'
retain: false
'0x00158d0002c9e43c':
friendly_name: '0x00158d0002c9e43c'
retain: false
'0x000b57fffea832da':
friendly_name: '0x000b57fffea832da'
retain: false
'0x90fd9ffffe1a79bc':
friendly_name: '0x90fd9ffffe1a79bc'
retain: false
state.json
{
"0x00158d0002b6ee02": {
"illuminance": 0,
"linkquality": 123,
"occupancy": false
},
"0x00158d0002b609b5": {
"illuminance": 3,
"linkquality": 99,
"occupancy": false
},
"0x00158d0002c9e43c": {
"battery": 100,
"voltage": 3005,
"contact": true,
"linkquality": 23
},
"0x000b57fffea832da": {
"state": "OFF",
"linkquality": 84,
"brightness": 254
},
"0x90fd9ffffe1a79bc": {
"state": "OFF",
"linkquality": 86,
"brightness": 254
}
}
These are the yaml documents, do you need more information?
Can you help my with this information?
Thanks!
Joey
Tinkerer
(aka DubhAd on GitHub)
September 3, 2019, 8:20pm
4
Ok, your automation looks good now.
If you select the automation (from States under Developer Tools ) and push TRIGGER does it work?
JoeyVG
(Joey)
September 3, 2019, 8:37pm
5
JoeyVG:
id: ‘1567540314982’ alias: New automation trigger: - entity_id: binary_sensor.0x00158d0002c9e43c_contact from: ‘false’ platform: state to: ‘true’ condition: action: - data: entity_id: light.0x000b57fffea832da_light service: light.turn_on
No it does not work when I press set state.
also it doesn’t work when I fill in ‘on’ or ‘trigger’ in ‘state’.
Tinkerer
(aka DubhAd on GitHub)
September 4, 2019, 8:16am
6
Please re-read what I posted
Developer tools
States
Find automation
Click on the little icon next to it
Push TRIGGER