Commit Graph

37 Commits (a0b185d06d15ad4e1536785a9f90f6e100da0093)

Author SHA1 Message Date
J. Nick Koston 015f9cdb35
Fix failing tessie tests (#110980) 2024-02-19 20:45:07 -06:00
Brett Adams 61766c0e59
Fix set_temperature in Tessie climate platform (#110445)
* HVAC_MODE support for set_temperature

* Fix import
2024-02-19 21:52:59 +01:00
Brett Adams 980413c57f
Add new range sensors to Tessie (#110446)
* Add new sensors

* Fix tests
2024-02-19 21:50:20 +01:00
Franck Nijhof e0a9dcd996
Add label registry (#110821) 2024-02-19 11:59:08 +01:00
Brett Adams da29b4ef16
Add Speed Limit to Tessie lock platform (#106527)
* Add speed limit

* Make regex more readable

* Add tests

* Add test

* Ruff

* Remove extra line

* Update snapshot

* Remove bad snapshot
2024-02-03 22:21:19 +01:00
Brett Adams e328d3ec5e
Add Charging sensor to Tessie (#108205) 2024-02-02 13:21:13 +01:00
Brett Adams d3dbd6fa70
Change device class of Auto Seat Heater sensors in Tessie (#109240) 2024-02-02 12:38:57 +01:00
Brett Adams 1584f02e71
Fix time to arrival to timestamp in Tessie (#109172)
* Fix time to arrival

* Update snapshot

* Freeze time for snapshot

* Fix docstring

* Add available_fn

* Update snapshot

* Dont use variance for full charge

* Remove unrelated changes

* Revert snapshot

* Rename hours_to_datetime
2024-01-31 15:52:58 -05:00
Robert Resch d752ab3aa4
Update climate snapshots to fix CI (#109141) 2024-01-30 16:54:41 +01:00
Brett Adams 128700d41b
Fix tessie tests (#109113)
* Fix device tracker test

* Snapshot cleanup
2024-01-30 11:34:30 +01:00
Brett Adams 858fb1fa37
Add snapshot testing to Tessie (#108346)
* Redo Binary Sensors

* Redo Button

* Redo Climate

* Stage unfixed platforms

* Redo Cover

* Redo device tracker

* Redo lock

* Redo Media Player

* Redo Number

* Redo Select

* Redo Sensor

* Redo Switch

* Redo Update

* Fix setup_platform

* Add mixing snapshot

* Fix config flow

* Centralise entity testing

* Update snapshot

* Rename test_entities

* Fix assert_entities
2024-01-27 13:43:55 +01:00
Brett Adams e1fd5e83a7
Add time to charge sensor to Tessie (#108342)
* Add time to charge and type checking

* Revert drive_state_shift_state change

* Use original name

* Use function instead of lambda

* Update homeassistant/components/tessie/sensor.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* Fix callback

* Avoid having to test None

* Go back to if

* Use minutes instead of hours

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-01-22 21:45:08 +01:00
Brett Adams 32b0bf6b4e
Improve coordinator logic in Tessie to allow sleep (#107988)
* Poll status before state

* Tests
2024-01-18 17:40:36 +01:00
Brett Adams 8b4d99f7d2
Add route sensors to Tessie (#106530)
* keys may be missing at startup

* Add route sensors and tracker location

* Fix keys and add translation

* Allow a sensor to have no value

* Move attribute to sensor

* Remove state attribute string
2024-01-14 08:08:54 +01:00
Brett Adams 6cbf1da76a
Add charge cable lock to Tessie (#107212)
* Add cable lock

* Translate exception

* Use ServiceValidationError
2024-01-13 19:03:10 +01:00
Brett Adams 5b706cedeb
Fix Tessie honk button (#106518) 2023-12-28 09:00:34 +01:00
Brett Adams 2afe3364ca
Add names to all Tessie entities (#106267)
* Add name back to device tracker and lock

* Add name to media player

* Add name to update

* Update snapshot

* Keep none name on Update

* Re-add update
2023-12-27 07:56:23 +01:00
Brett Adams 91aea843fc
Move Trunks from Button to Cover in Tessie (#106448)
* Move trunks from buttons to covers

* Add tests

* Cleanup snapshot

* Use Constants

* StrEnum to IntEnum
2023-12-27 06:56:09 +01:00
Brett Adams 2fe982c7f3
Handle failed updates in Tessie (#106450) 2023-12-26 17:19:44 -10:00
Brett Adams b51a242fd4
Add install to Tessie update platform (#106352) 2023-12-26 11:56:23 -10:00
Brett Adams 043f3e640c
Rework entity description functions in Tessie (#106287)
* use lamdba to return the library function

* Rename mocks

* lambda number

* Lambda button

* Add missing

* Remove context manager
2023-12-23 13:45:06 +01:00
Brett Adams b4f8fe8d4d
Add media player platform to Tessie (#106214)
* Add media platform

* Add more props

* Fix platform filename

* Working

* Add a test

* Update test and fixture

* Refactor media player properties to handle null values

* Add comments

* add more assertions

* Fix test docstring

* Use walrus instead.

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

* Test  when media player is idle

* Fix tests

* Remove None type from volume_level

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

* Return media position only when a media duration is > 0

* Remove impossible None type

* Add snapshot and freezer

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-22 12:07:47 +01:00
Brett Adams c824d06a8c
Add number platform to Tessie (#106205)
* Add number platform

* Make self.set consistent

* Fix test docstring

* Use entity descriptions

* Add patch_description to tests

* Rename argument to arg

* Make max key mandatory

* Set SOC min to normal value
2023-12-22 11:57:21 +01:00
Brett Adams 23fa86cc23
Add cover platform to Tessie (#105422)
* Add cover platform

* fix case

* Remove virtual key issue

* Remove redundant logic

* Fix logic that I missed

* Add missing types

* Add missing type

* Update entity

* Make window name better

* Fix test

* Update docstrings and comments
2023-12-22 10:17:23 +01:00
Brett Adams 1170e72913
Add lock platform to Tessie (#106216)
* Add lock platform

* Update tests

* fix test docstring
2023-12-22 10:11:48 +01:00
Brett Adams abc57ea706
Quality improvements for Tessie (#106218)
Quality improvements
2023-12-22 10:11:18 +01:00
Brett Adams 8918a9c2c4
Add button platform to Tessie (#106210) 2023-12-21 16:40:55 -10:00
Brett Adams e86ac568e1
Add device tracker to Tessie (#105428)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-21 14:28:58 -10:00
Brett Adams 13908cf5a6
Add update platform to Tessie (#106093)
* Add version platform

* Add strings and test

* Remove potential for None

* Dont show progress when no update is running

* Return None for no update

* Add comment

* Remove future feature

* WIP

* Fix statuses

* update fixture

* Remove entity name

* Remove name correctly

* Use False for in_progress
2023-12-21 12:43:11 +01:00
Brett Adams dbb726f41f
Add Select platform to Tessie (#105423)
* Add select platform

* Add error coverage

* Fix case

* fix value

* Remove virtual key issue

* Add TessieSeatHeaterOptions enum and update TessieSeatHeaterSelectEntity options

* use ENUM in tests

* Porting other fixes

* Update entity
2023-12-21 07:34:31 +01:00
Brett Adams e2cf4244ea
Add switch platform to Tessie (#106153)
* Add switch platform

* Make functions mandatory

* Underscores

* Improvements
2023-12-21 06:34:52 +01:00
Brett Adams 7c5824b4f3
Add climate platform to Tessie (#105420)
* Add climate platform

* Other fixes

* Use super native value

* change to _value

* Sentence case strings

* Add some more type definition

* Add return types

* Add some more assertions

* Remove VirtualKey error

* Add type to args

* rename climate to primary

* fix min max

* Use String Enum

* Add PRECISION_HALVES

* Fix string enum

* fix str enum

* Simplify run logic

* Rename enum to TessieClimateKeeper
2023-12-21 06:18:18 +01:00
Brett Adams a88335272a
Implement Review Feedback for Tessie (#105937) 2023-12-17 15:33:26 -10:00
Brett Adams 887f9a21e5
Add Binary Sensor platform to Tessie (#105421) 2023-12-15 18:56:38 -10:00
Brett Adams 8922c93259
Improve tests in Tessie (#105430) 2023-12-11 20:30:54 -10:00
Brett Adams 1cc47c0553
Add reauth to Tessie (#105419)
* First pass at Tessie

* Working POC

* async_step_reauth

* Config Flow tests

* WIP

* Add test requirement

* correctly gen test requirements

* 100% coverage

* Remove remnants of copy paste

* Add TPMS

* Fix docstring

* Remove redundant line

* Fix some more copied docstrings

* Grammar

* Create reusable StrEnum

* Streamline get

* Add a couple more sensors

* Removed need for a model

* Move MODELS

* Remove DOMAIN from config flow

* Add translation strings

* Remove unused parameter

* Simplify error handling

* Refactor coordinator to class

* Add missing types

* Add icon to shift state

* Simplify setdefault

Co-authored-by: J. Nick Koston <nick@koston.org>

* Use walrus for async_unload_platforms

Co-authored-by: J. Nick Koston <nick@koston.org>

* Reformat entity init

Co-authored-by: J. Nick Koston <nick@koston.org>

* Remove Unique ID

* Better Config Flow Tests

* Fix all remaining tests

* Standardise docstring

* Remove redudnant test

* Set TessieDataUpdateCoordinator on entity

* Correct some sensors

* add error types

* Make shift state a ENUM sensor

* Add more sensors

* Fix translation string

* Add precision suggestions

* Move session from init to coordinator

* Add api_key type

* Remove api_key parameter

* Meta changes

* Update TessieEntity and TessieSensor translations

* Goodbye translation keys

* bump tessie-api to 0.0.9

* Fix only_active to be True

* Per vehicle coordinator

* Rework coordinator

* Fix coverage

* WIP

* The grand rework

* Add comments

* Use ENUM more

* Add ENUM translations

* Update homeassistant/components/tessie/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Add entity_category

* Remove reauth

* Remove session

* Update homeassistant/components/tessie/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Add property tag

* Add error text

* Complete config flow tests

* Fix property and rename

* Fix init test

* Reworked coordinator tests

* Add extra checks

* Update homeassistant/components/tessie/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/tessie/coordinator.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* Ruff fix

* Update homeassistant/components/tessie/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Remove future ENUMs

Co-authored-by: J. Nick Koston <nick@koston.org>

* Ruff fix

* Update homeassistant/components/tessie/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Remove reauth and already configured strings

* Lowercase sensor values for translation

* Update homeassistant/components/tessie/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fixed, before using lambda

* Add value lambda

* fix lambda

* Fix config flow test

* @bdraco fix for 500 errors

* format

* Add reauth

* Reuse string in reauth

* Ruff

* remove redundant check

* Improve error tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 23:37:57 -08:00
Brett Adams 64a5271a51
Add Tessie Integration (#104684)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 12:46:32 -10:00