So, I started dipping my toes into HA last week. I’m currently working on getting more functionality out of my Schlage ZWave lock (BE369). There are a couple things my old Vera2 could do that HA can’t yet.
a) Logging which user just entered a code (or failed too many times)
b) UI to add/remove PIN codes
In terms of A, I need to start with just logging the notification, so I updated ZWaveAlarmSensor to the following:
def value_changed(self, value):
if self._value.value_id == value.value_id:
force_update is there because I want to force an update onto the bus whenever there is an ALARM message. It can be the same type/value each time (i.e. PIN code #1 entered) so the ‘state’ may not change but I still want to know about the notification
value_changed is overridden from a the base ZWave sensor because the base sees updates for anything happening to the same node and the above change causes messages to be sent out erroneously.
My questions are:
Does that change make sense for ANY ZWave alarm sensor, as in, should I submit a patch?
Should the ZWaveAlarmSensor actually just be a bridge to pass notifications onto the hass bus rather than save state? Unfortunately, openzwave breaks the single alarm notification into two separate variables so in the end you really need to wait around for both pieces to show up which means keeping state again … sigh
Are there any plans to allow for custom Zwave components to be registered for creation in place of standard ones given a specfic entity_id (like in the zwave customize configuration)? I’m not sure if I follow where load_platform actually searches for its pieces.