Hi all,
I run HA with KNX integration. Via KNX I can control some leds by submitting RGB values using 3 group addresses:
e.g.:
- service: knx.send
#red
data:
address: "5/3/30"
payload: "100"
type: "percent"
- service: knx.send
#green
data:
address: "5/3/31"
payload: "50"
type: "percent"
- service: knx.send
#blue
data:
address: "5/3/32"
payload: "0"
type: "percent"
Do you have any hints, how to make this accessible as a light in HA? I tried light template already (see below) but unfortuneatly only with very limited success:
- platform: template
lights:
myKnxLed:
friendly_name: "My KNX LED"
#WORKS:
turn_on:
- service: knx.send
data:
address: 5/3/30
payload: "100"
type: "percent"
- service: knx.send
data:
address: 5/3/31
payload: "100"
type: "percent"
- service: knx.send
data:
address: 5/3/32
payload: "100"
type: "percent"
#WORKS:
turn_off:
- service: knx.send
data:
address: 5/3/30
payload: "0"
type: "percent"
- service: knx.send
data:
address: 5/3/31
payload: "0"
type: "percent"
- service: knx.send
data:
address: 5/3/32
payload: "50"
type: "percent"
#WORKS (obviously for brightness < 100), still WIP:
set_level:
- service: knx.send
data:
address: 5/3/30
payload: "{{ brightness }}"
type: "percent"
- service: knx.send
data:
address: 5/3/31
payload: "{{ brightness }}"
type: "percent"
- service: knx.send
data:
address: 5/3/32
payload: "{{ brightness }}"
type: "percent"
# NOT WORKING:
set_color:
- service: knx.send
data:
address: 5/3/30
payload: "{{ r }}"
type: "percent"
- service: knx.send
data:
address: 5/3/31
payload: "{{ g }}"
type: "percent"
- service: knx.send
data:
address: 5/3/32
payload: "{{ b }}"
type: "percent"
The KNX system is preinstalled and cannot be modified from my side. Any feedback appreciated.