Commit Graph

10 Commits (b3f7f379df235bcd7ebdd2b039932c98e2dff937)

Author SHA1 Message Date
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet 5f309b69cf
Add type hints to current_request_with_host in tests (#119054) 2024-06-07 11:40:23 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
Marc Mueller 1ad8151bd1
Use PEP 695 type alias in tests (#117797) 2024-05-20 19:03:04 +02:00
Erik Montnemery 09a18459ff
Restore default timezone after electric_kiwi sensor tests (#116217) 2024-04-26 12:28:40 +02:00
Sid 0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Michael Arthur b1a246b817
Add account sensors to electric kiwi integration (#97681)
* add account sensors

* tidy up same issues as other sensors

* add unit tests for sensors

edit and remove comments

assert state and remove HOP sensor types since they aren't being used

* try and fix tests

* add frozen true

* Update tests/components/electric_kiwi/test_sensor.py

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

* return proper native types

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

* tidy up attr unique id

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

* add entities once and use native values properly

* Improve conftest

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

* tidy tests/components/electric_kiwi/test_sensor.py

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

* add assert to component_setup

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

* add extra parameters to test

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

* Update tests/components/electric_kiwi/test_sensor.py

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

* Update tests/components/electric_kiwi/test_sensor.py

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

* change coordinator name

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

* tidy up sensor translation names

* Apply suggestions from code review

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-13 18:12:40 +01:00
Michael Arthur 8beace265b
Add unit tests for sensors Electric Kiwi (#97723)
* add unit tests for sensors

* newline long strings

* unit test check and move time

* rename entry to entity

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

* add types to test

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

* fix newlined f strings

* remove if statement

* add some more explaination

* Update datetime

Co-authored-by: Robert Resch <robert@resch.dev>

* Simpler time update

Co-authored-by: Robert Resch <robert@resch.dev>

* add missing datetime import

* Update docustring - grammar

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

* address comments and issues raised

* address docstrings too long

* Fix docstring

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-11 01:30:25 +02:00
Michael Arthur 6ef7c5ece6
Add electric kiwi integration (#81149)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 10:46:53 +02:00