Regression: Cannot arm without a code in v3.0.15
I upgraded to v3.0.15 from the older version of this plugin that I was running, because the older version broke in the latest home assistant update.
After upgrading to v3.0.15 everything appeared to work except I could not arm without specifying a code. If I specified a code in the settings I was able to arm/disarm fine.
I recalled this being an issue in the older version of the plugin and being fixed by the change in this PR (which I don't think ever made it into the code base for 3.x, because at the time @elahd said in a comment that he had released v4 which had a fix for this, but then he ended up going back to releasing a new version of v3, and the fix for this still isn't in it).
https://github.com/pyalarmdotcom/alarmdotcom/pull/413
https://github.com/pyalarmdotcom/alarmdotcom/pull/413/commits/8231d1ec006b7a7dfae2625db15d785c7de59d0d
Note that this code change doesn't break the ability to specify a security code and to have the code required to arm/disarm, that still works fine with this.
So I made the exact same code change in the v3.0.15 code and restarted home assistant, it immediately resolved the issue. It looks like that same change still just needs to be made in the latest 3.x code...
Edit alarm_control_panel.py and find this line...
_device: libPartition
and put this beneath it...
_attr_code_arm_required = False
So that it looks like...
_device: libPartition
_attr_code_arm_required = False
That way if we don't specify a code to arm/disarm it'll still let us perform those actions and won't throw an error that no code was provided.
For anyone currently experiencing this issue, if you ssh into your home assistant you can hand patch the file under /root/config/custom_components/alarmdotcom/alarm_control_panel.py with this change for now, then restart home assistant.
-Ryan