added zigbee node labeling

This commit is contained in:
= 2020-12-25 17:16:50 +01:00
parent 13023bcfac
commit a47a38ef6d
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,5 @@
SUBSYSTEM=="usb", \
ACTION=="add", \
ATTRS{manufacturer}=="Texas Instruments", \
ATTRS{product}=="TI CC2531 USB CDC", \
SYMLINK+="zigbee"

View File

@ -32,9 +32,18 @@ Add the zwave udev rule:
- group: root
- mode: "0644"
Add the zigbee udev rule:
file.managed:
- name: /etc/udev/rules.d/90-zigbee.rules
- source: salt://k3s/files/etc/udev/rules.d/90-zigbee.rules
- user: root
- group: root
- mode: "0644"
reload udev rules:
cmd.run:
- name: udevadm control --reload
- onchanges:
- file: Add the rfxcom udev rule
- file: Add the zwave udev rule
- file: Add the zigbee udev rule

View File

@ -1,5 +1,5 @@
{% set label = data['path'].split('/')[-1] -%}
{% if label in ['rfxtrx433', 'zwave'] -%}
{% if label in ['rfxtrx433', 'zwave', 'zigbee'] -%}
{% if data['change'] == 'IN_CREATE' -%}
{% set label = label + '=true' -%}
{% else %}