Closed MarcW22 closed 1 year ago
Hey there @julius2342, @farmio, @marvin-w, mind taking a look at this issue as it has been labeled with an integration (knx
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
knx documentation knx source (message by IssueLinks)
Hi 👋!
This seems awkward - there were no changes in KNX from 2023.1.0 until now. Nevertheless I have had an occasion where the event_register service did not work too in one of the last 2022.12 releases, but didn't see any error message like yours, or any log output 🤔 nor could I reproduce it.
How do you get to show that message screen? Was the KNX integration loaded properly when the service was used?
Trying the service on current 2021.1.2 seems to work fine.
Hi farmio,
i checked the release notes and didn't find any changes. I got the error direct after restart from HA after the update. It showed me a notification that 4 of my automations have an issue under the repair section in HA.
I went back to 2023.1.1 and now it works again. I Try to make the update on my test environment later this day and try to upload the diagnostics etc.
Cheers, Marc
Ah by the way i added some extra lines to your blue print as i use philips Hue + ambilight and needed to give Color and brightness as well to the blueprint
blueprint:
name: KNX - relative dimming for lights
description:
Controll Home Assistant Light entities from KNX switching and relative
dimming (DPT 3.007) telegrams.
domain: automation
input:
target_lights:
name: Light
description: The lights that shall be controled.
selector:
target:
entity:
domain: light
switch_address:
name: Switch group address
description:
"Group address for switching the lights on and off. DPT 1 Example:
'1/2/3'
"
dimm_address:
name: Relative dimming address
description:
"Group address for dimming the lights. DPT 3.007 Example: '1/2/4'
"
dimm_time:
name: Dimm time
description: Time dimming from 0 to 100% shall take.
selector:
number:
min: 1.0
max: 20.0
step: 0.1
unit_of_measurement: seconds
mode: slider
default: 3
dimm_steps:
name: Dimm steps
description: Steps used to dimm from 0 to 100%.
selector:
number:
min: 2.0
max: 100.0
step: 1.0
unit_of_measurement: steps
mode: slider
default: 10
# NEW MARC BEGIN
initial_value:
name: Initial value
description: Initial value for light on, from 20% to 100%.
selector:
number:
min: 20
max: 100
step: 10
unit_of_measurement: "%"
mode: slider
default: 100
initial_color:
name: Initial value
description: Initial color for light on.
selector:
color_rgb:
default:
- 255
- 206
- 120
# NEW MARC END
source_url: https://community.home-assistant.io/t/knx-relative-dimming-for-lights/273473
mode: restart
max_exceeded: silent
variables:
# NEW MARC BEGIN
_initial_value: !input initial_value
_initial_color: !input initial_color
# NEW MARC END
_dimm_time: !input dimm_time
_dimm_steps: !input dimm_steps
dimm_time: "{{ _dimm_time|float }}"
dimm_steps: "{{ _dimm_steps|int }}"
dimm_step: "{{ (255 / dimm_steps) | round(0, 'ceil') }}"
dimm_delay: "{{ dimm_time * 1000 / dimm_steps }}"
trigger:
- platform: homeassistant
event: start
id: initialize
- platform: event
event_type: automation_reloaded
id: initialize
- platform: event
event_type: service_registered
event_data:
domain: knx
service: event_register
id: initialize
- platform: event
event_type: knx_event
event_data:
destination: !input switch_address
telegramtype: GroupValueWrite
id: switch
- platform: event
event_type: knx_event
event_data:
destination: !input dimm_address
telegramtype: GroupValueWrite
id: dimm
action:
- choose:
- conditions:
condition: and
conditions:
- condition: trigger
id: switch
- "{{ trigger.event.data.data == 1 }}"
sequence:
- service: light.turn_on
target: !input target_lights
# NEW MARC BEGIN
data:
brightness_pct: "{{ _initial_value }}"
rgb_color: "{{ _initial_color }}"
# NEW MARC BEGIN
- conditions:
condition: and
conditions:
- condition: trigger
id: switch
- "{{ trigger.event.data.data == 0 }}"
sequence:
- service: light.turn_off
target: !input target_lights
- conditions:
condition: and
conditions:
- condition: trigger
id: dimm
- "{{ 9 <= trigger.event.data.data <= 15 }}"
sequence:
- repeat:
count: "{{ dimm_steps }}"
sequence:
- service: light.turn_on
target: !input target_lights
data:
brightness_step: "{{ dimm_step }}"
- delay:
milliseconds: "{{ dimm_delay }}"
- conditions:
condition: and
conditions:
- condition: trigger
id: dimm
- "{{ 1 <= trigger.event.data.data <= 7 }}"
sequence:
- repeat:
count: "{{ dimm_steps }}"
sequence:
- service: light.turn_on
target: !input target_lights
data:
brightness_step: "{{ -dimm_step }}"
- delay:
milliseconds: "{{ dimm_delay }}"
- conditions:
condition: trigger
id: initialize
sequence:
- service: knx.event_register
data:
address: !input switch_address
- service: knx.event_register
data:
address: !input dimm_address
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
Hi,
Unfortunately the knx.event_register doesn’t work anymore after i made the core update to 2023.1.2. I use this for the relative dimming with an automation with this Blueprint
I also tried to solve the issue by adding the following lines to my knx.yaml
And this is the automation:
I am not 100% sure if this is a Bug but after I went back to 2023.1.1 it worked fine again.
What version of Home Assistant Core has the issue?
2023.1.2
What was the last working version of Home Assistant Core?
2023.1.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
KNX
Link to integration documentation on our website
https://www.home-assistant.io/integrations/knx/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response