Commit Graph

23 Commits

Author SHA1 Message Date
Franck Nijhof ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Jan Bouwhuis df58b5d9bd
Replace async_schedule_update_ha_state for manual and manual_mqtt (#84395)
Replace deprecated async_schedule_update_ha_state
2022-12-22 08:48:33 +01:00
Paolo Bonzini 52594717ca
Fix manual.alarm_control_panel RestoreEntity bugs (#82990)
* manual: add previous state for TRIGGERED as well

This will be useful to properly restore timers on restart.

* manual: correctly restore timers on startup
2022-12-19 11:19:24 +01:00
Paolo Bonzini 02fa5656bb
Make manual and manual_mqtt fully asynchronous (#83436)
* manual: make it completely async

Restoring the timers on startup cannot use track_point_in_time,
because the restoring code runs from the async_added_to_hass
method.  Rewrite everything to run in the event loop instead
of using threaded wrappers, this way the code can be reused in
async_added_to_hass.

* manual_mqtt: replace async function with @callback

* manual_mqtt: make it completely async

Restoring the timers on startup cannot use track_point_in_time,
because the restoring code runs from the async_added_to_hass
method.  Rewrite everything to run in the event loop instead
of using threaded wrappers, this way the code can be reused in
async_added_to_hass when state restore is added.

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2022-12-17 19:31:17 +01:00
epenet 7871a517a8
Import constants from root (#78271) 2022-09-12 18:53:05 +02:00
epenet 6dc6e71f01
Use attributes in manual alarm (#74122) 2022-06-29 10:19:39 +02:00
epenet 8e1ec07f3d
Adjust type hints in component alarm methods (#74092)
* Adjust type hints in component alarm methods

* Undo related change

* Undo related change
2022-06-28 10:00:23 +02:00
Franck Nijhof 1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum (#69861) 2022-04-18 19:37:32 +02:00
Franck Nijhof be7fc35dfa
Add EntityFeature enum to Alarm Control Panel (#69044) 2022-04-01 13:54:03 +02:00
epenet 24fc0df4b0
Add alarm_control_panel setup type hints (#63264)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 10:57:25 +01:00
Marc Mueller a48ddcadd4
Use assignment expressions 31 (#58715) 2021-10-30 16:29:07 +02:00
Marc Mueller 48bada5a18
Update pylint to 2.11.1 (#56364) 2021-09-18 13:52:59 +02:00
mbo18 a28593f133
Add vacation mode to manual alarm_control_panel (#55340)
* Add vacation mode

* Add vacation to demo

* Deduplicate code in tests
2021-09-01 09:34:21 +02:00
Erik Montnemery 14a59d290a
Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01:00
Franck Nijhof 0e98bc5ea2
Skip template result parsing in several places (#42408)
* Skip template result parsing in several places

* Adjust alert integration

* Adjust Alexa integration

* Adjust apns integration

* Adjust arest integration

* Adjust dialogflow integration

* Adjust generic camera integration

* Adjust imap email content  integration

* Adjust InfluxDB integration

* Adjust intent integration

* Adjust logbook integration

* Adjust HP ILO integration

* Adjust manual alarm control panel integration

* Adjust manual mqtt alarm control panel integration

* Adjust minio integration

* Adjust mqtt integration

* Adjust notify integration

* Adjust persistent notification integration

* Adjust rest integration

* Adjust rss feed template integration

* Adjust slack integration

* Adjust Xiaomi integration

* Adjust TCP integration

* Adjust Telegram Bot integration

* Bump CI cache version

* Revert "Bump CI cache version"

This reverts commit 875efe58cf.

* Adjust demo tests
2020-10-26 19:29:10 +01:00
springstan 513f03eb1f
Return attribute dict directly without temporary variable v2 (#41271) 2020-10-06 16:55:16 +02:00
Erik Montnemery 6f7f5b4034
Rename AlarmControlPanel to AlarmControlPanelEntity (#34590) 2020-04-25 18:05:28 +02:00
starkillerOG 7bfc1d2840
Use "arming" state during transition in manual alarm panel (#32950)
* Manual Alarm Control Panel: use proper "Arming" state

* Update previous and next attributes

* add CONF_ARMING_TIME

* Split up arming and pending time, pending_time --> arming_time

* update tests

* fix issort

* fix issort

* fix demo platform

* fix alarm test

* remove arming_time from the triggered state

* Match previous default "delay_time"

* fix tests

* fix arming state when triggering

* fix arming _arming_time_by_state for Triggering state

* change to not in list

* Update homeassistant/components/manual/alarm_control_panel.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* async_update_ha_state -> async_write_ha_state

* black formatting

* add Callback

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* import callback

* update device triggers alarm_control_panel

* Update test_device_trigger.py

* Update device_trigger.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-24 00:07:07 +02:00
SukramJ 1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Kevin Cooper 1460f7bd80 Add code_arm_required to manual alarm (#22618)
* Add code_arm_required to manual alarm

* Add fix for alarm front end more-info-alarm_control_panel
2019-06-17 14:59:20 -07:00
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen 1ddc249989
Consolidate more platforms (#22308)
* Consolidate final platforms

* Fix some tests

* Fix more tests

* Fix more tests
2019-03-23 20:22:35 -07:00