Skip to content

Commit

Permalink
Merge pull request #54 from rsnodgrass/0.4.6-branch
Browse files Browse the repository at this point in the history
0.4.6
  • Loading branch information
rlippmann authored Apr 21, 2024
2 parents 7327746 + 7fe956c commit 5c6298e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 0.4.6 (2024-04-21)

* add arm night
* bump pyadtpulse to 1.2.9
This should fix some more instances where it is needed to recover from errors/disconnects

## 0.4.5 (2024-04-04)

* bump minimum HA version to 2024.04.0
* fix import of FlowResult

## 0.4.4 (2024-03-06)

* update connection status and next update sensors on successful data fetch
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,5 @@ No plans to implement support for the following (however, feel free to contribut
# Credits
* Huge thanks to [Richard Lippmann / rlippmann@](https://github.com/rlippmann). During 2023-2024 Richard made major contributions to pyadtpulse to support async behavior, including switching Home Assistant integration to fully use the async mechanism.
* Huge thanks to [Robert Lippmann / rlippmann@](https://github.com/rlippmann). During 2023-2024 Richard made major contributions to pyadtpulse to support async behavior, including switching Home Assistant integration to fully use the async mechanism.
* [Ryan Snodgrass](https://github.com/rsnodgrass) for originally contributing a skeleton and initial working implementation to have a Home Assistant integration.
10 changes: 10 additions & 0 deletions custom_components/adtpulse/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
STATE_ALARM_ARMING,
STATE_ALARM_DISARMED,
STATE_ALARM_DISARMING,
STATE_ALARM_ARMED_NIGHT,
STATE_UNAVAILABLE,
)
from homeassistant.core import HomeAssistant, callback
Expand All @@ -34,6 +35,7 @@
ADT_ALARM_HOME,
ADT_ALARM_OFF,
ADT_ALARM_UNKNOWN,
ADT_ALARM_NIGHT,
)
from pyadtpulse.site import ADTPulseSite

Expand All @@ -56,6 +58,7 @@
ADT_ALARM_HOME: STATE_ALARM_ARMED_HOME,
ADT_ALARM_OFF: STATE_ALARM_DISARMED,
ADT_ALARM_UNKNOWN: STATE_UNAVAILABLE,
ADT_ALARM_NIGHT: STATE_ALARM_ARMED_NIGHT,
}


Expand Down Expand Up @@ -128,6 +131,7 @@ def supported_features(self) -> AlarmControlPanelEntityFeature:
AlarmControlPanelEntityFeature.ARM_AWAY
| AlarmControlPanelEntityFeature.ARM_CUSTOM_BYPASS
| AlarmControlPanelEntityFeature.ARM_HOME
| AlarmControlPanelEntityFeature.ARM_NIGHT
)

@property
Expand Down Expand Up @@ -204,6 +208,12 @@ async def async_alarm_arm_custom_bypass(self, code: str | None = None) -> None:
self._site.async_arm_away(force_arm=True), FORCE_ARM
)

async def async_alarm_arm_night(self) -> None:
"""Send arm night command."""
await self._perform_alarm_action(
self._site.async_arm_night(), STATE_ALARM_ARMED_NIGHT
)

async def async_alarm_arm_force_stay(self) -> None:
"""Send force arm stay command.
Expand Down
4 changes: 2 additions & 2 deletions custom_components/adtpulse/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"iot_class": "cloud_push",
"issue_tracker": "https://github.com/rsnodgrass/hass-adtpulse/issues",
"requirements": [
"pyadtpulse>=1.2.8"
"pyadtpulse>=1.2.9"
],
"version": "0.4.5"
"version": "0.4.6"
}

0 comments on commit 5c6298e

Please sign in to comment.