Commit Graph

7 Commits (c896458fcf75102c88ecc90ffa61a7b9f632336e)

Author SHA1 Message Date
Brett Adams af0dd189d9
Improve error handling in Teslemetry (#117336)
* Improvement command handle

* Add test for ignored reasons
2024-05-12 19:37:59 -07:00
Brett Adams 1a4e416bf4
Refactor Teslemetry integration (#112480)
* Refactor Teslemetry

* Add abstractmethod

* Remove unused timestamp const

* Ruff

* Fix

* Update snapshots

* ruff

* Ruff

* ruff

* Lint

* Fix tests

* Fix tests and diag

* Refix snapshot

* Ruff

* Fix

* Fix bad merge

* has as property

* Remove _handle_coordinator_update

* Test and error changes
2024-05-10 10:52:33 +02:00
Brett Adams f249a9ba4b
Add API scope checks to Teslemetry (#113640) 2024-04-23 22:11:41 +02:00
Brett Adams 219cb7a788
Add additional sensors to Teslemetry (#112555)
* Add more sensors

* Fix coverage

* Dont do this rename yet

* Fix case

* Update snapshot

* Add icons

* Remove unused icons

* Update snapshot

* Remove last_value logic from TimeSensor

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update constant case

* Remove useless test

* Add refresh test back

* Add assertion to post coordinator refresh

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-03-16 11:54:37 +01:00
Brett Adams b5528de807
Add sensor platform to Teslemetry (#109088)
* Adding Energy

* Adding Energy

* Work in progress

* Add fixtures

* Add product info

* Add sensors

* Add icons

* Update metadata

* Use SensorEntityDescription for Energy

* Use ENERGY_STORAGE

* Add tests

* Fix coverage

* Update wall connector precision and units

* Change devices

* Fix serial number

* Add icons and VIN to wall connector

* Fix serial number again

* Update snapshots

* Use timestamp for minutes to arrival

* Cleanup snapshot

* Improvements

* Update fixture

* Add "code" to translations

* Add "code" to snapshot

* Use async_add_entities once

* Disable a bunch of sensors

* Ruff

* Improve fixture and test coverage

* Regen Snapshots

* Add init to coordinator
2024-03-04 18:42:56 +01:00
Brett Adams b28e8a3cf0
Add tests to Teslemetry (#108884)
* Add tests

* Add partial sleep test

* Remove useless AsyncMock

* Review feedback

* Patch imports

* Fix mock_test
2024-01-28 21:04:44 +01:00
Brett Adams 909cdc2e5c
Add Teslemetry Integration (#108147)
* Copy Paste Find Replace

* Small progress

* wip

* more wip

* Add SSE listen and close

* More rework

* Fix coordinator

* Get working

* Bump to 0.1.3

* Push to 0.1.4

* Lots of fixes

* Remove stream

* Add wakeup

* Improve set temp

* Be consistent with self

* Increase polling until streaming

* Work in progress

* Move to single climate

* bump to 0.2.0

* Update entity

* Data handling

* fixes

* WIP tests

* Tests

* Delete other tests

* Update comment

* Fix init

* Update homeassistant/components/teslemetry/entity.py

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

* Add Codeowner

* Update coverage

* requirements

* Add failure for subscription required

* Add VIN to model

* Add wake

* Add context manager

* Rename to wake_up_if_asleep

* Remove context from coverage

* change lock to context

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

* Improving Logger

* Add url to subscription error

* Errors cannot markdown

* Fix logger

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

* rename logger

* Fix error logging

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-25 12:54:47 +01:00