Commit Graph

15 Commits (3a0e816f1b8173fafc5b5afdcc09fb430284bcd6)

Author SHA1 Message Date
Raman Gupta 4cd4fbefbf
Add new tomorrow.io integration to replace Climacell (#68156)
* Add new tomorrow.io integration to replace Climacell - Part 1/3 (#57121)

* Add new tomorrow.io integration to replace Climacell - Part 1/3

* remove unused code

* remove extra test

* remove more unused code

* Remove even more unused code

* Feedback

* clean up options flow

* clean up options flow

* tweaks and fix tests

* remove device_class from tomorrowio entity description class

* use timestep

* fix tests

* always use default name but add zone name if location is in a zone

* revert change that will go into future PR

* review comments

* move code out of try block

* bump max requests to 500 as per docs

* fix tests

* Add new tomorrow.io integration to replace Climacell - Part 2/3 (#57124)

* Add new tomorrow.io integration to replace Climacell - Part 2/3

* translations

* set config flow to false in manifest

* Cleanup more code and re-add options flow test

* fixes

* patch I/O calls

* Update tests/components/climacell/test_config_flow.py

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

* remove unused import

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

* Fix codeowners

* fix mypy and pylint

* Switch to DeviceInfo

* Fix fixture location and improve sensor entities in tomorrowio integration (#63527)

* Add new tomorrow.io integration to replace Climacell - Part 3/3 (#59698)

* Switch to DeviceInfo

* Add new tomorrow.io integration to replace Climacell - Part 1/3 (#57121)

* Add new tomorrow.io integration to replace Climacell - Part 1/3

* remove unused code

* remove extra test

* remove more unused code

* Remove even more unused code

* Feedback

* clean up options flow

* clean up options flow

* tweaks and fix tests

* remove device_class from tomorrowio entity description class

* use timestep

* fix tests

* always use default name but add zone name if location is in a zone

* revert change that will go into future PR

* review comments

* move code out of try block

* bump max requests to 500 as per docs

* fix tests

* Migrate ClimaCell entries to Tomorrow.io

* tweaks

* pylint

* Apply fix from #60454 to tomorrowio integration

* lint and mypy

* use speed conversion instead of distance conversion

* Use SensorDeviceClass enum

* Use built in conversions and remove unused loggers

* fix requirements

* Update homeassistant/components/tomorrowio/__init__.py

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

* Use constants

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

* Black

* Update logic and add coverage

* remove extra line

* Do patching correctly

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-19 08:42:22 +01:00
Erik Montnemery e50a47621f
Enable basic type checking for climacell (#55334) 2021-12-03 10:08:23 -08:00
Marc Mueller be201e3ebe
Use assignment expressions 27 (#58188) 2021-10-22 11:29:21 +02:00
Robert Hillis 488a636aec
Clean up unused loggers (#57662) 2021-10-14 10:03:38 -07:00
Erik Montnemery 4e07ab1b32
Move temperature conversions to sensor base class (1/8) (#48261)
* Move temperature conversions to entity base class (1/8)

* Update integrations a-c

* Leave old temperature conversion until all integrations are migrated

* tweak

* Use contextlib.suppress

* Remove the MeasurableUnitEntity mixin

* Address comments, add tests

* Fix f-string

* Drop deprecation warning from base entity class

* Update with _attr-shorthand

* Fix rebase mistakes

* Fix additional rebase mistakes

* Only report temperature conversion once

* Fix additional rebase mistakes

* Format homeassistant/components/bbox/sensor.py

* Fix check for overidden _attr_state

* Remove test workarounds from implementation

* Remove useless None-check

* Tweaks

* Migrate new sensors a-c

* Update climacell

* Push deprecation of temperature conversion forward

* Override __repr__ in SensorEntity

* Include native_value in SensorEntity attributes

* Pylint

* Black

* Black

* Fix rebase mistakes

* black

* Fix rebase mistakes

* Revert changes in august/sensor.py

* Revert handling of unit converted restored state

* Apply code review suggestion

* Fix arlo test
2021-08-11 10:45:05 +02:00
Marc Mueller 553521a76b
Add mixin classes for required keys in EntityDescription (#53610) 2021-07-28 11:50:13 +02:00
Marc Mueller 3908aabc13
Use EntityDescription - climacell (#53573)
* Use EntityDescription - climacell

* Fix tests

* Fix coverage ignore comment
2021-07-27 23:47:29 +02:00
Raman Gupta 562aa74c77
Switch to dataclass from dictionary for climacell sensor definitions (#53168)
* Switch to dataclass from dictionary for climacell sensor definitions

* fix post_init

* fix dataclass and add test

* Update homeassistant/components/climacell/sensor.py

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Update homeassistant/components/climacell/const.py

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* simplify logic

* use tuple

* simplify unit of measurement and use class attributes

* Switch from UnitT to str

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-20 00:22:41 -04:00
Erik Montnemery 777fec62a5
Set device class for climacell temperature sensors (#52965) 2021-07-13 13:35:55 -04:00
Raman Gupta 23339cff95
Add new climacell sensors (#52079)
* Add new climacell sensors

* lint

* add new unit constants
2021-06-27 15:03:20 -04:00
Raman Gupta 9f1b1c6c56
Add value map for Climacell V3 pollen sensors (#50200) 2021-05-06 21:12:51 -07:00
Ruslan Sayfutdinov cbaeec2a4e
Use AddEntitiesCallback type, pt.2 (#49921) 2021-04-30 20:38:59 +02:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Franck Nijhof 006bcde435
Remove HomeAssistantType alias - Part 3 (#49339) 2021-04-17 12:48:03 +02:00
Raman Gupta 898a1a17be
Add sensors for other ClimaCell data (#49259)
* Add sensors for other ClimaCell data

* add tests and add rounding

* docstrings

* fix pressure

* Update homeassistant/components/climacell/sensor.py

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

* Update homeassistant/components/climacell/sensor.py

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

* review comments

* add another abstractmethod

* use superscript

* remove mypy ignore

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-15 16:31:59 -04:00