I might be on to something.
When I turn on a regular light, I get three events, in order:
event_type: myhome_message_event
data:
gateway: 10.0.5.2
message: "*1*1000#0*09##"
family: Command translation
type: Status
who: 1
where: "09"
what: 1000
what parameters:
- "0"
origin: LOCAL
time_fired: "2024-04-18T17:36:45.059288+00:00"
context:
id: 01HVS4GG03Z60NT9PTT6R971TW
parent_id: null
user_id: null
event_type: myhome_message_event
data:
gateway: 10.0.5.2
message: "*1*0*09##"
family: Event
type: Status
who: 1
where: "09"
origin: LOCAL
time_fired: "2024-04-18T17:36:45.132662+00:00"
context:
id: 01HVS4GG2CBSCJ9T7TSA5M55Q2
parent_id: null
user_id: null
event_type: state_changed
data:
entity_id: light.terrazza_piccola
old_state:
entity_id: light.terrazza_piccola
state: "on"
attributes:
supported_color_modes:
- onoff
color_mode: onoff
A: "0"
PL: "9"
friendly_name: Small Terrace
supported_features: 8
last_changed: "2024-04-18T17:36:43.909439+00:00"
last_reported: "2024-04-18T17:36:43.909439+00:00"
last_updated: "2024-04-18T17:36:43.909439+00:00"
context:
id: 01HVS4GEW5FAY2PA7RATTA80R8
parent_id: null
user_id: null
new_state:
entity_id: light.terrazza_piccola
state: "off"
attributes:
supported_color_modes:
- onoff
color_mode: null
A: "0"
PL: "9"
friendly_name: Small Terrace
supported_features: 8
last_changed: "2024-04-18T17:36:45.133549+00:00"
last_reported: "2024-04-18T17:36:45.133549+00:00"
last_updated: "2024-04-18T17:36:45.133549+00:00"
context:
id: 01HVS4GG2DF1RGCS1S369ESH9S
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2024-04-18T17:36:45.133549+00:00"
context:
id: 01HVS4GG2DF1RGCS1S369ESH9S
parent_id: null
user_id: null
Which I assume is the event for the light switch and its translation by the integration.
If I do so with a dimmable light
event_type: myhome_message_event
data:
gateway: 10.0.5.2
message: "*1*1000#1*13##"
family: Command translation
type: Status
who: 1
where: "13"
what: 1000
what parameters:
- "1"
origin: LOCAL
time_fired: "2024-04-18T17:43:57.886245+00:00"
context:
id: 01HVS4XPNYXGDDY547AHBRF42R
parent_id: null
user_id: null
event_type: myhome_message_event
data:
gateway: 10.0.5.2
message: "*1*10*13##"
family: Event
type: Status
who: 1
where: "13"
what: 10
origin: LOCAL
time_fired: "2024-04-18T17:43:57.925931+00:00"
context:
id: 01HVS4XPQ50MGF8THJPXBWKRJ6
parent_id: null
user_id: null
2024-04-18 19:43:57.886 DEBUG (MainThread) [custom_components.myhome] [F454 gateway - 10.0.5.2] Message received: `*1*1000#1*13##`
2024-04-18 19:43:57.886 DEBUG (MainThread) [custom_components.myhome] [F454 gateway - 10.0.5.2] Ignoring translation message `*1*1000#1*13##`
2024-04-18 19:43:57.925 DEBUG (MainThread) [custom_components.myhome] CHIPOTLE
2024-04-18 19:43:57.925 DEBUG (MainThread) [custom_components.myhome] [F454 gateway - 10.0.5.2] Message received: `*1*10*13##`
2024-04-18 19:43:57.937 ERROR (MainThread) [custom_components.myhome] Traceback (most recent call last):
File "/config/custom_components/myhome/gateway.py", line 264, in listening_loop
self.hass.data[DOMAIN][self.mac][CONF_PLATFORMS][LIGHT][message.entity][CONF_ENTITIES][LIGHT],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: '1-13'
Could it be due to the dimmable light message format?
I use a DALI dimmer, could that be the cause?