core
core copied to clipboard
Unable to adjust brightness with Vimar 14595.0 via Homekit
The problem
When I try to adjust the brightness from the associated entity the brightness goes down (or up) and then goes back up at the previous level. For example, if I set the brightness to 80% via the physical buttons and then set it to 40% via HA, the brightness will set itself to 40% for a second, then return to 80%.
What version of Home Assistant Core has the issue?
2025.3.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Homekit Device
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit_controller
Diagnostics information
config_entry-homekit_controller-01JQ517DBR38V0YVPJKZ803KDY-1.json
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
Hey there @jc2k, @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit_controller) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of homekit_controller can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign homekit_controllerRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
homekit_controller documentation homekit_controller source (message by IssueLinks)
Please add debug logs
Please add debug logs
@bdraco Do you mean these?
Entity id is: "light.luce_sala_da_pranzo"
Hi, is there anything new?
@bdraco, @Jc2k, I see that the "label" is still present missing-diagnostics-and-logs", but I have already uploaded logs and diagnostics. Please if anything else is missing you can let me know. I'm sorry but I'm not very practical.
There is no need to ping us. We will get to your issue when we have time. I only get 1 or 2 days a month to look at homekit_controller issues as this is something I do in my spare time.
The log you posted doesn't have debug enabled.
Please follow the steps at https://www.home-assistant.io/docs/configuration/troubleshooting/#enabling-debug-logging
Make sure to reproduce the problem when debug logging is enabled
These are the new files, I did as directed. I hope they go well. config_entry-homekit_controller-01JQ517DBR38V0YVPJKZ803KDY.json home-assistant_homekit_controller_2025-04-06T10-55-57.867Z.log
2025-04-06 12:55:33.026 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.178.68: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 192.168.178.68\r\nContent-Length: 83\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":141,"iid":10,"value":32},{"aid":141,"iid":9,"value":1}]}'
2025-04-06 12:55:34.150 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.178.68: raw response: bytearray(b'')
2025-04-06 12:55:34.151 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(141, 10): {'value': 32}, (141, 9): {'value': 1}}
2025-04-06 12:55:34.151 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 68:E1:8B:48:31:91
2025-04-06 12:55:34.227 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(141, 10): {'value': 32}}
2025-04-06 12:55:34.227 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 68:E1:8B:48:31:91
2025-04-06 12:55:37.221 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(141, 10): {'value': 81}}
2025-04-06 12:55:37.221 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 68:E1:8B:48:31:91
aid 141, iid 9
{
"type": "00000025-0000-1000-8000-0026BB765291",
"iid": 9,
"perms": [
"pr",
"pw",
"ev"
],
"format": "bool",
"value": true,
"description": "On"
},
aid 141, iid 10
{
"type": "00000008-0000-1000-8000-0026BB765291",
"iid": 10,
"perms": [
"pr",
"pw",
"ev"
],
"format": "int",
"value": 81,
"description": "Brightness",
"unit": "percentage",
"minValue": 0,
"maxValue": 100,
"minStep": 1
},
In this case you made a service call and it set the brightness to 32, and the power state to 1 (on)
2025-04-06 12:55:33.026 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.178.68: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 192.168.178.68\r\nContent-Length: 83\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":141,"iid":10,"value":32},{"aid":141,"iid":9,"value":1}]}'
The device accepts the PUT request and we get a callback from aiohomekit
2025-04-06 12:55:34.151 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(141, 10): {'value': 32}, (141, 9): {'value': 1}}
A few microseconds later, the device sends and event that its been set to 32
2025-04-06 12:55:34.227 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(141, 10): {'value': 32}}
3 seconds later, without any commands being sent to the device it sends back that the brightness is now 81
2025-04-06 12:55:37.221 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(141, 10): {'value': 81}}
It seems like the physical buttons are overriding the state. This is something you'll need to bring up with the device manufacturer as I expect the exact same issue is going to happen if you unpair it from Home Assistant and pair to iOS directly.
It works fine with IOS. The issue is only present on HA
I don't see anything wrong with what we're sending; everything looks good to me. Maybe one of my colleagues will spot something I missed.
Maybe iOS doesn't send on if its already on
You could try this patch and see if it makes a difference:
diff --git a/homeassistant/components/homekit_controller/light.py b/homeassistant/components/homekit_controller/light.py
index 5409df7c1a8..e249690c13e 100644
--- a/homeassistant/components/homekit_controller/light.py
+++ b/homeassistant/components/homekit_controller/light.py
@@ -206,6 +206,7 @@ class HomeKitLight(HomeKitEntity, LightEntity):
characteristics[CharacteristicsTypes.HUE] = hs_color[0]
characteristics[CharacteristicsTypes.SATURATION] = hs_color[1]
+ if not self.service.value(CharacteristicsTypes.ON):
characteristics[CharacteristicsTypes.ON] = True
await self.async_put_characteristics(characteristics)
Ok, How do I insert it?
Fwiw, I'm getting the same behaviour on a LIFX bulb over HomeKit integration (it still works over SmartThings perfectly fine). Colour changes don't work either, and this is a regression that only started happening in the past two months (after over a year of working perfectly fine)
Maybe iOS doesn't send on if its already on
You could try this patch and see if it makes a difference:
diff --git a/homeassistant/components/homekit_controller/light.py b/homeassistant/components/homekit_controller/light.py index 5409df7c1a8..e249690c13e 100644 --- a/homeassistant/components/homekit_controller/light.py +++ b/homeassistant/components/homekit_controller/light.py @@ -206,6 +206,7 @@ class HomeKitLight(HomeKitEntity, LightEntity): characteristics[CharacteristicsTypes.HUE] = hs_color[0] characteristics[CharacteristicsTypes.SATURATION] = hs_color[1]
if not self.service.value(CharacteristicsTypes.ON): characteristics[CharacteristicsTypes.ON] = True await self.async_put_characteristics(characteristics)
I didn't understand where to insert this patch. I tried on the terminal but it gives me some errors. Can anyone help me?
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.