* Enable alarmdecoder to see open/close state of bypassed zones when armed
The alarmdecoder component already reported RF state bits as attributes. If the user knows which loop is set up for the zone in the alarm panel, they can use that information to tell whether the zone is open or closed even when the system is armed by monitoring the appropriate attribute. That’s awkward, so this commit enables the user to simply configure which loop is used and the component will update the state itself.
* Simplify, also it's more correct to treat it as a state change rather than a
permanent state, since it's possible the decoder might miss some events.
* Remove relative import
* Add MVP
* Remove unused code
* Fix
* Add force back
* Fix tests
* Storage keyed
* Error out when storage doesnt find config
* Use old load_yaml
* Set config for panel correct
* Use instance cache var
* Make config option
This works by adding `?check_same_thread=False` to the sqlite
connection string, as suggested by robbiet480@.
It upgrades pygtfs from homeassitant's forked 0.1.3 version to 0.1.5.
Fixes#15725
* radiotherm: bump version to 2.0.0
* radiotherm: change handling of transient errors from tstat
Radiotherm 2.0.0 now throws an exception when a transient error is
detected, instead of returning -1 for the field where the error was
detected. This change supports handling the exception.
* Fix google assistant request sync service call
* More descriptive services.yaml
* Update services.yaml
* Update __init__.py
* Update request sync service call timeout
Change from 5s to 15s to allow Google to respond. 5s was too short. The service would sync but the service call would time out and throw the error.
* Add Philips Moonlight Bedside Lamp support
* Update comment
* Make hound happy
* Wrap the call that could raise the exception only
* Remote blank line
* Use updated python-miio API
* Set lock status correctly for Schlage BE469 Z-Wave locks
PR #17386 attempted to improve the state of z-wave lock tracking for
some problematic models. However, it operated under a flawed
assumptions. Namely, that we can always trust `self.values` to have
fresh data, and that the Schlage BE469 sends alarm reports after every
lock event. We can't trust `self.values`, and the Schlage is very
broken. :)
When we receive a notification from the driver about a state change,
we call `update_properties` - but we can (and do!) have _stale_
properties left over from previous updates. #17386 really works best
if you start from a clean slate each time. However, `update_properties`
is called on every value update, and we don't get a reason why.
Moreover, values that weren't just refreshed are not removed. So blindly
looking at something like `self.values.access_control` when deciding to
apply a workaround is not going to always be correct - it may or may not
be, depending on what happened in the past.
For the sad case of the BE469, here are the Z-Wave events that happen
under various circumstances:
RF Lock / Unlock:
- Send: door lock command set
- Receive: door lock report
- Send: door lock command get
- Receive: door lock report
Manual lock / Unlock:
- Receive: alarm
- Send: door lock command get
- Receive: door lock report
Keypad lock / Unlock:
- Receive: alarm
- Send: door lock command get
- Receive: door lock report
Thus, this PR introduces yet another work around - we track the current
and last z-wave command that the driver saw, and make assumptions based
on the sequence of events. This seems to be the most reliable way to go
- simply asking the driver to refresh various states doesn't clear out
alarms the way you would expect; this model doesn't support the access
control logging commands; and trying to manually clear out alarm state
when calling RF lock/unlock was tricky.
The lock state, when the z-wave network restarts, may look out of sync
for a few minutes. However, after the full network restart is complete,
everything looks good in my testing.
* Fix linter
* Automatically detect if ipv4/ipv6 is used for cert_expiry
Fixes#18818
Python sockets use ipv4 per default. If the domain which should be checked
only has an ipv6 record, socket creation errors out with
`[Errno -2] Name or service not known`
This fix tries to guess the protocol family and creates the socket
with the correct family type
* Fix line length violation
* Fix unavailable
Change setting to unavailable when getting request exceptions only after 1 minute has past since 1st occurrence.
* Put common code in _check_state_available
Put common code to determine if available should be set to False in method _check_state_available