Commit graph

70 commits

Author SHA1 Message Date
Marc Mueller
bcd1243686
Use VolDictType to improve schema typing (#120417) 2024-06-25 15:15:59 +02:00
Marc Mueller
44049c34f9
Use PEP 695 type alias for ConfigEntry types (#117632) 2024-05-17 15:42:58 +02:00
Sid
ac54cdcdb4
Enable Ruff RUF010 (#115371)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-08 23:54:49 +02:00
Michael
a4139f1a61
Store runtime data inside the config entry in Proximity (#116533) 2024-05-01 21:51:47 +02:00
J. Nick Koston
b6d0c9d1c3
Migrate proximity to use async_track_state_change_event (#115002) 2024-04-06 12:00:30 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid
ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
Marc Mueller
cef20506dc
Replace EventType with Event [missing] (#112753) 2024-03-08 21:56:42 +01:00
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] (#112702) 2024-03-08 15:04:07 +01:00
Michael
2a135b64b6
Add missing unit of measurement for tolerance option in proximity (#111876) 2024-02-29 22:16:27 +01:00
Erik Montnemery
e0c1feb22c
Migrate integrations n-r to generic flowhandler (#111864) 2024-02-29 20:09:01 +01:00
Michael
45f44e9216
Use tracked entity friendly name for proximity sensors (#109744)
user tracked entity friendly name
2024-02-05 20:18:59 +01:00
Joost Lekkerkerker
8df305c881
Remove obsolete check from Proximity (#109701) 2024-02-05 16:32:39 +01:00
Michael
c34f5dd0b9
Add icon translation to proximity (#109664)
add icon translations
2024-02-05 01:36:11 +01:00
Michael
ffe9f0825a
Add zone related sensors in proximity (#109630)
* move legacy needed convertions into legacy entity

* add zone related sensors

* fix test coverage

* fix typing

* fix entity name translations

* rename placeholder to tracked_entity
2024-02-05 00:42:07 +01:00
Michael
ac8a4f4b05
Redact location names in proximity diagnostics (#109600) 2024-02-04 15:12:08 +01:00
Michael
17f1aa644b
Avoid duplicate entity names in proximity (#109413)
* avoid duplicate config entry title

* consecutive range 2..10

* use existing logic
2024-02-04 13:26:51 +01:00
Michael
e567236cac
Add diagnostics to proximity (#109393) 2024-02-02 23:03:55 +01:00
Michael
e11e54fd50
Apply review comments on proximity (#109249)
use a named tuple as TrackedEntityDescriptor
2024-02-01 09:02:38 +01:00
Michael
30c5baf522
Add configflow to Proximity integration (#103894)
* add config flow

* fix tests

* adjust and fix tests

* fix tests

* config_zones as fixture

* add config flow tests

* use coordinator.async_config_entry_first_refresh

* use entry.entry_id for hass.data

* fix doc string

* remove unused unit_of_measurement string key

* don't store friendly_name, just use self.name

* abort on matching entiry

* break out legacy setup into seperate function

* make tracked entites required

* move _asnyc_setup_legacy to module level

* use zone name as config entry title

* add entity_used_in helper

* check entry source if imported

* create repair issue for removed tracked entities

* separate state change from registry change event handling

* migrate unique ids after tracked entity renamed

* use full words for the variable names

* use defaultdict

* add test

* remove unnecessary if not in check

* use unique_id of tracked entity

* use the entity registry entry id

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-31 12:47:23 +01:00
Michael
d007327cf5
Deprecate legacy Proximity entity (#108730)
* deprecate proximity entity

* add test

* extend tests

* adjust strings

* make issue fixable

* use default repairflow
2024-01-26 19:04:48 +01:00
Michael
eaa32146a6
Add sensor platform to Proximity (#101497)
* add sensor platform

* transl. of distance already covered by dev.class

* add untested files to .coveragerc

* add missing state translations

* remove translation key for distance sensor

* proximity entity do not use HA number system

* fix

* extend tests

* make const final to be usable as key for TypedDict

* remove proximity from .coveragerc

* replace typeddict by simple dict definition

* make black happy

* rework to create proximity sensor for each tracked entity and always recalculate all entites

* apply review comments

* move direction of travel calc out of the loop

* make direction of travel an enum sensor

* remove unique_id from sensors

* don't set distance=0 when in monitored zone

* set None when direction is unknown

* keep distance 0 in case arrived for legacy entity

* exclude from nearest when in ignored zone

* keep distance=0 when arrived

* use description name for entity name

* remove uneeded typing

* uses consistent variable name

* fix debug messages

* use entity_id as loop var

* rename device_state to tracked_entity_state

* correct MRO for sensor entity classes
2024-01-23 10:56:02 +01:00
Michael
ea6a26467e
Add myself as codeowner for Proximity (#104100)
add myself as codeowner for proximity
2023-11-16 23:12:10 +01:00
Michael
efe33d815f
Address late proximity coordinator review comments (#103879) 2023-11-12 21:36:54 +01:00
Michael
b2f31d5763
Implement update coordinator in Proximity (#103443) 2023-11-12 18:28:39 +01:00
Michael
2616794e1d
Fix proximity entity id (#102992)
* fix proximity entity id

* extend test to cover entity id
2023-10-29 10:43:57 +01:00
Michael
6202f178af
Fix proximity zone handling (#102971)
* fix proximity zone

* fix test
2023-10-28 22:32:42 -04:00
Martin Hjelmare
91087392fe
Disable proximity no platform log (#95838) 2023-07-04 12:52:04 +02:00
J. Nick Koston
be08bb5ba6
Convert proximity to be async (#93241) 2023-05-18 16:32:12 -05:00
Erik Montnemery
5dfb9cddd6
Sort manifests 8 (#87029) 2023-02-08 20:13:46 +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
d72c28a135
Use UnitOfLength in integrations (#84034) 2022-12-15 12:42:53 +01:00
epenet
24c26dc032
Use unit_conversion in components (#79204)
* Use unit_conversion in components

* Two more
2022-09-28 16:05:31 +02:00
Erik Montnemery
7ead77eea6
Correct typing of async_track_state_change (#79150)
* Correct typing of async_track_state_change

* Update integrations
2022-09-27 16:32:54 +01:00
epenet
03a24e3a05
Improve type hints in proximity (#78348) 2022-09-14 11:22:58 +02:00
Marc Mueller
3a45168b97
Improve proximity typing (#65053)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-27 17:05:08 +01:00
epenet
4fad49ec57
Add setup type hints to proximity (#63990)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-13 02:30:10 +01:00
GitHub Action
72b0eb719e [ci skip] Translation update 2021-11-20 00:12:27 +00:00
Marc Mueller
62c20860ac
Use assignment expressions 22 (#57971) 2021-10-21 08:33:10 +02:00
Daniel Hjelseth Høyer
fbad453c89
Pylint 2.9.3 (#52972)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
GitHub Action
0c5ce9cac2 [ci skip] Translation update 2021-07-07 00:11:57 +00:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery
346a724ac3
Mark base components' state_attribute @final, rename others to extra_state_attributes (#48161)
* Mark base state_attributes @final, rename others to extra_state_attributes

* Fix calendar, update tests
2021-03-21 10:38:24 +01:00
springstan
67b3552165
Add more units to distance conversion util (#40181)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-09 11:38:15 +01:00
HomeAssistant Azure
6ae12c3faf [ci skip] Translation update 2020-10-10 00:05:05 +00:00
Ville Skyttä
5e90a4d000
Use more state attribute name constants (#40428) 2020-09-21 23:03:39 +02:00
springstan
9311b02369
Use LENGTH_FEET constant (#34053) 2020-06-10 21:38:29 +02:00
Joakim Sørensen
730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen
95357dfc55 Update translations 2020-04-20 16:33:54 -07:00
Paulus Schoutsen
0d60d40512 Update translations 2020-04-16 13:00:10 -07:00