core
core copied to clipboard
Not able to toggle lock in UI Verisure
The problem
I use to toggle the lock in the UI but since beta 2023.2.0b4 or since beta 2023.2.0b0, I get an error message. "Failed to call service lock/lock. Code "for locking None doesn´t match pattern ^\d{6}$" I have the lock code in the config and number of digits as before.
What version of Home Assistant Core has the issue?
Home Assistant 2023.2.0b5
What was the last working version of Home Assistant Core?
Home Assistant 2023.1.7
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Verisure
Link to integration documentation on our website
https://www.home-assistant.io/integrations/verisure/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (verisure
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of verisure
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Change the title of the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign verisure
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
verisure documentation verisure source (message by IssueLinks)
This problem has started for me too after upgrading to Home Assistant 2023.2.0 (at least that is the only change that has been made since the integration stopped working). I'm on a docker install.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/lock/__init__.py:102
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:45:44 AM (2 occurrences)
Last logged: 11:41:59 AM
[140549383789424] Code '' for unlocking None doesn't match pattern ^\d{6}$
[140548017923376] Code '' for unlocking None doesn't match pattern ^\d{6}$
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 681, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 721, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/lock/__init__.py", line 102, in _async_unlock
raise ValueError(
ValueError: Code '' for unlocking None doesn't match pattern ^\d{6}$
Just downgraded to Home Assistant 2023.1.7 using docker and the integration works again so I can confirm that the issue was introduced in 2023.2.0
Have the same problem, as above the issue only appeared after upgrading to the beta, however if I go into the lock info I can enter a code and it works to lock/unlock the door.
Have the same problem, as above the issue only appeared after upgrading to the beta, however if I go into the lock info I can enter a code and it works to lock/unlock the door.
The issue is recreated if you go to your integrations page and enter a default code for the integration to use. Click the configure button on the Verisure integration to enter a default code.
Same issue here. Look error code in bottom.
+1
+1. Any progress on this or is it quiet?
+1. Any progress on this or is it quiet?
Not heard a thing.
I got the same issue after upgrading. Considering roll-back if it is not fixed. Kind of crucial integration for me.
Same issue here...
Same issue here.
Still an issue with 2023.2.2., when using default lock code.
Same problem :(
I installed 2023.2.2 and removed number of digits and default PIN in settings for the verisure integration. Then the automations containing a pin started working again!
I installed 2023.2.2 and removed number of digits and default PIN in settings for the verisure integration. Then the automations containing a pin started working again!
Same here! Nice
I installed 2023.2.2 and removed number of digits and default PIN in settings for the verisure integration. Then the automations containing a pin started working again!
Can I ask how you did this, I do not understand from just the comment here. Sorry about that.
I guess this is where I don't understand your change. I am doing my automation through Node Red, not the HA Automations, and since the code is defined on the Verisure integration with the right user logging in, I don't have to provide it in the automation config. Are you saying that you had additional code in your HA automation, and when you removed it, your automation worked?
You have also added the code in the Verisure integration config right? Or am I completely misunderstanding what you're showing?
I guess this is where I don't understand your change. I am doing my automation through Node Red, not the HA Automations, and since the code is defined on the Verisure integration with the right user logging in, I don't have to provide it in the automation config. Are you saying that you had additional code in your HA automation, and when you removed it, your automation worked?
You have also added the code in the Verisure integration config right? Or am I completely misunderstanding what you're showing?
See the "xxxxxx" in my automation. There you add your door code. Use ha automation for it. Mutch more simple then node red for this. At the moment, verisure integration code does not work.
I guess this is where I don't understand your change. I am doing my automation through Node Red, not the HA Automations, and since the code is defined on the Verisure integration with the right user logging in, I don't have to provide it in the automation config. Are you saying that you had additional code in your HA automation, and when you removed it, your automation worked?
You have also added the code in the Verisure integration config right? Or am I completely misunderstanding what you're showing?
Remove the code from Verisure integration and use call service in Node red. Add the code in call service node (at the bottom it shows what the item is called in Json editor. ) Bing it works ;)
Thank you both, I got it now. I'll try to remove the code from the integration and then test in NR before upgrading, and as long as it works fine now I should be fine upgrading.
and @crackers81, I don't agree that HA automation is easier than NR though, once you know NR everything becomes simpler ;) But it's also like a religion or the old Apple/Android discussion, it's quite subjective.
Thank you both, I got it now. I'll try to remove the code from the integration and then test in NR before upgrading, and as long as it works fine now I should be fine upgrading.
and @crackers81, I don't agree that HA automation is easier than NR though, once you know NR everything becomes simpler ;) But it's also like a religion or the old Apple/Android discussion, it's quite subjective.
Whatever floats your boat hehe. I use both. Something are easyer in nr og visa versa :) agreed ;)
Whatever floats your boat hehe. I use both. Something are easyer in nr og visa versa :) agreed ;)
I was extremely reluctant to do NR from the start and stuck with HA automation as only engine for the longest time, but now I am a convert ;) I still have some automations that I haven't moved to NR just because it simply doesn't make any difference, but I do all my new there. But it's great to have options, something for everyone.
Remove the code from Verisure integration and use call service in Node red. Add the code in call service node (at the bottom it shows what the item is called in Json editor. ) Bing it works ;)
I have still not upgraded as I thought of one thing. In my UI I am using the lock. references directly, and there is no code in the code behind it, and no automation, just switch function lock/unlock. How would that work if I remove the code on the integration since I cannot add it on the device setup directly?
Anyone know if this will be fixed back to normal function soon?
@frenck Do you have time to look at this? 💯
For info; the service enable_autolock is still working. I have a timebase automation that enables auto lock at 9pm so the door gets locked at night anyways. Still a problem but maybe can't help some in the waiting for a solution :)
@frenck Do you have time to look at this? 💯
There is already a pull request pending that will probably fix this. It's awaiting review. When it's merged it will be included in a HA release. It's already linked in this thread, but I'll include the link below
https://github.com/home-assistant/core/pull/87544
@frenck Do you have time to look at this? 💯
There is already a pull request pending that will probably fix this. It's awaiting review. When it's merged it will be included in a HA release. It's already linked in this thread, but I'll include the link below
#87544
The pull you are linking to is 1 week old. This is 2 weeks old. Weird with no answer here first........ Thanks
I read the release notes of the 2023.2.5 version now, but I do not see any mention of the Verisure fix. Can anyone confirm if it did come into this new version last night, or if it's still waiting to be implemented?
The fix has not been implemented. The pull request has been changed to a draft awaiting an architecture discussion.
They will decide if they will implement the fix or revert the code change that introduced this problem in the first place.
I have no idea when the discussion is going to take place. Until then we have to make do with the workarounds or an older version sadly.