Commit Graph

114 Commits

Author SHA1 Message Date
Brett Adams
84e3dac406 Update vehicle type handling in Teslemetry (#148862) 2025-07-16 10:05:17 +02:00
Brett Adams
ffc2b0a8cf Add mock for listen in Teslemetry tests (#148853) 2025-07-16 08:09:54 +02:00
Brett Adams
bb17f34bae Remove history first refresh from Teslemetry (#148531) 2025-07-13 13:01:38 +02:00
Brett Adams
19d89c8952 Fix energy history in Teslemetry (#147646) 2025-06-27 19:43:03 +02:00
Brett Adams
ddef6fdb98 Add streaming to charge cable connected in Teslemetry (#145880) 2025-05-31 20:01:10 +02:00
Joost Lekkerkerker
4aade14c9e Fix CI (#145644)
* Fix CI

* Fix CI
2025-05-26 21:55:33 +02:00
Brett Adams
001164ce1b Remove available property for streaming in Teslemetry (#145352) 2025-05-26 21:11:35 +02:00
Abílio Costa
b626204f63 Add default device class display precision for Sensor (#145013)
* Add default device class display precision for Sensor

* Renaming, docstrings, cleanup

* Simplify units list

* Fix tests

* Fix missing precision when suggested is specified

* Update snapshots

* Fix when unit of measurement is not valid

* Fix tests

* Fix deprecated unit usage

* Fix goalzero tests

The sensor native_value method was accessing the data dict and trowing,
since the mock did not have any data for the sensors.

Since now the precision is always specified (it was missing for those
sensors), the throw was hitting async_update_entity_options in _update_suggested_precision.
Previously, async_update_entity_options was not called since it had no
precision.

* Fix metoffice

* Fix smartthings

* Add default sensor data for Tesla Wall Connector tests

* Update snapshots

* Revert spaces

* Update smartthings snapshots

* Add missing sensor mock for tesla wall connector

* Address review comments

* Add doc comment

* Add cap to doc comment

* Update comment

* Update snapshots

* Update comment
2025-05-26 19:40:29 +02:00
Erik Montnemery
4e1d5fbeb0 Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
Brett Adams
ffb485aa87 Fix streaming window cover entity in Teslemetry (#145012) 2025-05-19 22:13:15 +02:00
Brett Adams
8ccedd4064 Add credit balance sensor to Teslemetry (#144365)
* Add credits

* Credits string and icon

* Add test

* tests and fixes

* Add units

* Update homeassistant/components/teslemetry/sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update snapshot with unit

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-05-14 12:21:45 +02:00
Brett Adams
d2a692393f Fix wall connector states in Teslemetry (#144855)
* Fix wall connector

* Update snapshot
2025-05-14 08:08:24 +02:00
Brett Adams
e3b3c32751 Add valet switch to Teslemetry (#144167)
* Add valet switch

* Add snapshot
2025-05-05 06:28:01 +02:00
Brett Adams
de496c693e Add hazard lights binary sensor to Teslemetry (#144166) 2025-05-04 13:36:13 +02:00
Brett Adams
20df183470 Improve energy entities in Teslemetry (#143641)
* Energy fixes

* improvements

* Add more icons
2025-04-28 18:47:12 +02:00
Brett Adams
c6ebba8843 Add streaming connectivity binary sensors to Teslemetry (#143443)
* Add connectivity entities

* Add connectivity entities

* Fix Wi-Fi spelling in Teslemetry component
2025-04-28 12:58:40 +02:00
Brett Adams
a1ca0a1cb2 Dont add location entities without location scope in Teslemetry (#143497)
* Dont add location entities without location scope

* Fix tests

* simplify logic

* Add test
2025-04-27 11:25:58 +02:00
Brett Adams
7016c19b2f Disable polling for modern vehicles in Teslemetry (#143495) 2025-04-24 23:59:26 +02:00
Brett Adams
2e2faeb612 Add remaining Binary Sensor entities to Teslemetry (#143384) 2025-04-22 13:16:29 +02:00
Norbert Rittel
26ea97cb44 Fix spelling of "off-grid" and "on-grid" in teslemetry (#143357)
* Fix spelling of "off-grid" and "on-grid" in `teslemetry`

* Update test_number.ambr
2025-04-20 21:21:06 +03:00
Brett Adams
7c3df46570 Add typed listeners to Teslemetry binary sensor platform (#142238) 2025-04-19 11:29:14 +02:00
Brett Adams
c34e280fc2 Add typed listeners to Teslemetry sensor platform (#142236) 2025-04-19 10:56:29 +02:00
Brett Adams
4a6d2c91da Bump tesla-fleet-api to v1.0.16 (#140869)
* Add streaming climate

* fixes

* Add missing changes

* Fix restore

* Update homeassistant/components/teslemetry/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use dict

* Add fan mode translations

* Infer side

* WIP

* fix deps

* Migration in progress

* Working

* tesla-fleet-api==1.0.15

* tesla-fleet-api==1.0.16

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-03-26 12:28:16 +01:00
Brett Adams
013439f7c6 Add streaming to Climate platform in Teslemetry (#138689)
* Add streaming climate

* fixes

* Add missing changes

* Fix restore

* Update homeassistant/components/teslemetry/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use dict

* Add fan mode translations

* Infer side

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/teslemetry/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-03-25 21:09:45 +01:00
Norbert Rittel
4bbd49af53 Capitalize "PIN to Drive" feature name in teslemetry (#141011)
* Capitalize "PIN to Drive" as feature name in `teslemetry`

Fixes the spelling of "PIN" for consistency and turns "PIN to Drive" into the feature name that Tesla uses (in English).

* Update test_binary_sensor.ambr
2025-03-20 19:20:08 +02:00
Brett Adams
251bb30dc7 Add streaming media platform to Teslemetry (#140482)
* Update media player

* Add media player platform with tests and bump firmware
2025-03-14 15:27:18 +01:00
Brett Adams
220bd5a27f Fix time to full charge in Teslemetry (#137996)
* Fix streaming full charge

* ruff
2025-03-14 14:48:17 +01:00
Brett Adams
4e759e59a4 Add streaming switches to Teslemetry (#137145)
* Add streaming switches

* Add switch tests

* Update snapshot

* Fix sentry

* update test docstring
2025-03-14 14:41:09 +01:00
Brett Adams
8620309f9e Add streaming to Teslemetry update platform (#140021)
* Update platform

* Tests

* fix tests
2025-03-10 15:06:40 +01:00
Brett Adams
800cdee409 Update Diagnostics in Teslemetry (#138759)
* Testing

* Diag
2025-02-18 09:44:29 +01:00
Erik Montnemery
4b34d1bbb5 Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

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

* Improve docstrings and strings.json

---------

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

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Brett Adams
d48d4284c5 Add streaming select entities to Teslemetry (#137210) 2025-02-05 16:48:50 +01:00
Brett Adams
ea62da553e Correct the behavior of the Charge switch in Tessie/Teslemetry/Tesla Fleet (#136562) 2025-01-29 11:41:33 +01:00
Brett Adams
77d42f6c57 Add streaming to Teslemetry lock platform (#136037) 2025-01-28 17:44:05 +01:00
Brett Adams
941461b427 Add streaming to Teslemetry number platform (#136048) 2025-01-28 17:43:41 +01:00
Brett Adams
6292d6c0dc Add streaming to device tracker platform in Teslemetry (#135962)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-01-19 13:20:40 +01:00
Brett Adams
24bb623567 Add streaming to Teslemetry cover platform (#135660) 2025-01-17 17:38:03 +01:00
Brett Adams
65df8b946f Update buttons in Teslemetry (#135631)
* Update button

* tests
2025-01-15 08:32:46 +01:00
Brett Adams
6a032baa48 Add streaming binary sensors to Teslemetry (#135248)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-01-14 13:46:10 +01:00
Brett Adams
dae87db244 Fix when live status is blank in Telsemetry (#130408) 2025-01-13 12:44:36 +01:00
Brett Adams
b6c0257c43 Add streaming sensors to Teslemetry (#132783)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-01-09 18:58:12 +01:00
Brett Adams
513c8487c5 Check vehicle metadata (#134381) 2025-01-01 12:09:15 +01:00
Joost Lekkerkerker
2aba1d399b Rename test file to singular form (#133482) 2024-12-18 12:47:30 +00:00
Brett Adams
17521f25b6 Remove sleep and forbidden handling from Teslemetry (#132784) 2024-12-10 08:35:53 +01:00
Brett Adams
1929b368fe Remove legacy behavior from Teslemetry (#132760) 2024-12-09 23:11:23 +01:00
Brett Adams
3656bcf752 Fix "home" route in Tesla Fleet & Teslemetry (#129546)
* translate Home to home

* refactor for mypy

* Fix home state

* Revert key change

* Add testing
2024-10-31 08:56:03 +01:00
Brett Adams
da9749ecce Add data streaming to Teslemetry (#127559) 2024-10-25 11:50:37 +02:00
Erik Montnemery
bd55fe868d Allow update entities to report progress as a float (#128930)
* Allow update entities to report progress as a float

* Add test

* Update snapshots

* Update recorder test

* Use _attr_* in MockUpdateEntity
2024-10-24 21:20:18 +02:00
Erik Montnemery
e861cab727 Add update_percentage state attribute to update entity (#128877)
* Add update_percentage state attribute to update entity

* Update tests

* Update tests
2024-10-21 15:31:48 +02:00
epenet
120e17fa1e Improve logic for detecting unused ignore translations (#128441) 2024-10-18 17:59:06 +02:00