Commit graph

652 commits

Author SHA1 Message Date
Erik Montnemery
5b55c7da5f
Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00
Erik Montnemery
84e74e4c74
Reverse component path (#104087)
* Reverse component path

* Update translations helper

* Fix

* Revert incorrect change of PLATFORM_FORMAT

* Fix use of PLATFORM_FORMAT in tts

* Fix ios
2023-12-05 08:43:58 +01:00
Erik Montnemery
95f7db1970
Move config_per_platform and extract_domain_configs to config.py (#104989) 2023-12-04 12:48:49 +01:00
Franck Nijhof
a96ee22afa
Migrate notify services to support translations (#96413)
* Migrate notify services to support translations

* Apply suggestions from code review

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 14:37:45 -04:00
Kevin Cathcart
d700415045
Support notification_id in notify.persistent_notification (#74822)
* Support notification_id in notify.persistent_notification

* Apply suggestions from code review

Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>
2023-06-25 22:25:58 -04:00
epenet
3058cc8d56
Adjust targets type hint in notify platform (#90062) 2023-03-26 19:52:55 +02:00
Erik Montnemery
1450b44c63
Sort manifests 7 (#87028) 2023-02-08 20:32:43 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
epenet
7af86fe130
Improve notify type hints (#86685) 2023-01-26 16:23:03 +01:00
Marc Mueller
6397138589
Update Optional typing (1) [Py310] (#86417)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-23 09:56:10 +01:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00
Marc Mueller
c068024abe
Allow None return for notify get_service (#82444) 2022-11-21 08:18:37 +01:00
Marc Mueller
0c8eeaa643
Update mypy to 0.990 (#81783)
* Update mypy to 0.990

* Remove type ignore - overriding attr with property (13475)

* Remove type ignores - hasattr (13544)

* Adjust type ignore - assignment (13549)

* New error code - type-abstract (13785)

* Disable annotation-unchecked (13851)
2022-11-08 14:41:39 +01:00
Franck Nijhof
2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00
Martin Hjelmare
383c83d15f
Improve notify typing (#78575) 2022-09-16 12:52:24 +02:00
Marc Mueller
87ab14d758
Add protocol type for legacy notify platforms (#77894) 2022-09-06 20:18:52 +02:00
J. Nick Koston
03fac0c529
Fix race in notify setup (#76954) 2022-08-17 22:37:47 -04:00
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
Dave T
8245ebaef5
Correct grammar in notification description (#70249) 2022-04-19 11:12:24 +02:00
Jan Bouwhuis
cfc8b5fee7
Fix notify discovery setup (#68451)
* Fix notify discovery setup

* add test

* unsubscribe at reset

* Add guard

* move dispatcher to reload module

* only unsubscribe if platform was setup

* initialize dispatcher once and tests

* test get_service too

* add tests

* fix test

* use get_service for test invalid platform

* Test built-in reload method

* set to None after clearing dispatcher - tests

* Pathing services file

* Update tests/components/notify/test_init.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* dispatcher is not set twice if integration loaded

* empty discovery payload

* Removed not needed services.yaml mock

* Update tests/components/notify/test_init.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* flake8

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-28 08:53:30 +02:00
Franck Nijhof
85b87ffb8b
Remove deprecated APNS integration (#67158) 2022-02-24 10:31:00 +01:00
GitHub Action
6364e81be5 [ci skip] Translation update 2022-02-24 00:17:55 +00:00
Marc Mueller
67e94f2b4b
Add type ignore error codes [N-Z] (#66779) 2022-02-18 09:41:12 +01:00
epenet
4eae888546
Fix incorrect type hint in config_per_platform helper (#63890)
* Adjust base helper

* Filter type is not None in mailbox

* Filter empty platforms in device_tracker

* Filter out empty platform in notify

* Filter out empty platform in entity_component

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-11 17:28:37 +01:00
Tobias Sauerwein
2c904c0974
Bump mypy to 0.930 (#62642)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
GitHub Action
86b12af3dc [ci skip] Translation update 2021-11-10 00:17:39 +00:00
Marc Mueller
eab235173b
Use assignment expressions 28 (#58189) 2021-10-22 14:06:04 +02:00
Martin Hjelmare
cc4241836e
Move notify setup to legacy (#58033) 2021-10-21 16:09:08 -07:00
Philip Allgaier
548b872229
Add missing names for notify service fields (#58154) 2021-10-21 08:20:37 +02:00
Paulus Schoutsen
a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Paulus Schoutsen
d4864f5750
Deprecate passing template to notify (#56069) 2021-09-20 21:49:02 -07:00
Marc Mueller
69e413ac1e
Update pylint to 2.10.1 (#54963)
* Update pylint to 2.10.0

* useless-suppression

* Consider-using-tuple

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use dict.items()

* Add pylint disable

* Use pylint 2.10.1

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-21 10:41:23 +02:00
tkdrob
028a07d86f
Wrap up selectors (#50794)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 14:45:17 +02:00
tkdrob
bd443af6a2
Add targets and selectors for services (N-O) (#50608) 2021-05-15 10:30:18 +02:00
Franck Nijhof
44383f25ce
Clean up pylint comments (#49334) 2021-05-05 08:56:50 +02:00
J. Nick Koston
12e3bc8101
Provide api to see which integrations are being loaded (#48274)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:44 -10:00
Philip Allgaier
450f3740cd
Use consolidated constant for "description" (#48490) 2021-03-31 14:12:15 +02:00
Franck Nijhof
c1d5638739
Remove HomeAssistantType alias from entity components - Part 2 (#48468) 2021-03-29 13:24:56 -10:00
HomeAssistant Azure
55b689b464 [ci skip] Translation update 2021-03-23 00:03:29 +00:00
Marc Mueller
3d2b81a401
Update typing 11 (#48072) 2021-03-18 13:21:46 +01:00
HomeAssistant Azure
c11b85af2f [ci skip] Translation update 2021-03-16 00:04:36 +00:00
Franck Nijhof
5d5a110a20
None optional hass typing in base entity and notify (#47528) 2021-03-15 15:11:41 +01:00
Bram Kragten
afa91e886b
Add description to tts and notify services (#46764)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-02-23 14:29:57 +01:00
Ville Skyttä
a6358430b4
Fix deprecated asyncio.wait use with coroutines (#44981)
https://docs.python.org/3/library/asyncio-task.html#asyncio-example-wait-coroutine
2021-02-10 14:16:58 +01:00
Paulus Schoutsen
959ed6d077 Update translations 2021-02-03 11:46:49 +01:00
Alan Tse
4928476abe
Allow notify services to update existing targets (#45283) 2021-01-18 21:42:20 +01:00
Paulus Schoutsen
7d23ff6511
Add device action to mobile app to notify (#43814) 2020-12-01 18:14:01 +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
Kevin Cathcart
754ba18af0
Add persistent_notification service to the notify platform (#40638)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-21 17:12:36 +02:00
J. Nick Koston
480b8165d7
Update notify to use async_add_executor_job (#41516) 2020-10-08 23:58:33 +02:00