Commit Graph

69 Commits (05de7a78d1c87b7bcdce9dbba7d89aa4ec7db3d3)

Author SHA1 Message Date
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
Raman Gupta f60fbf7197
Update Climacell rate limit (#54373) 2021-08-09 20:16:18 -07:00
GitHub Action ba93bda3ad [ci skip] Translation update 2021-08-05 00:34:46 +00:00
GitHub Action 8c5620e74b [ci skip] Translation update 2021-08-02 03:40:04 +00: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
Robert Hillis 7e59f3160b
Use entity class attributes for climacell (#53444) 2021-07-25 02:19:08 -04:00
Paulus Schoutsen ce382a39d0
Block title in strings.json unless internal or allowed (#53304) 2021-07-22 08:37:33 +02:00
Raman Gupta 6e88428f95
Fix typing for climacell dataclass (#53240) 2021-07-20 19:31:55 +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
Marc Mueller f6b162bc39
Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
GitHub Action 531733da7b [ci skip] Translation update 2021-07-19 00:09:50 +00:00
Raman Gupta 794571efdd
Add missing device classes for climacell sensors (#52979) 2021-07-13 20:13:56 +02:00
Erik Montnemery 777fec62a5
Set device class for climacell temperature sensors (#52965) 2021-07-13 13:35:55 -04:00
apaperclip 49181d6ba8
Remove scale calculation for climacell cloud cover (#52752) 2021-07-08 12:10:05 -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
GitHub Action 7615af35d8 [ci skip] Translation update 2021-06-07 00:18:16 +00:00
GitHub Action c81df50191 [ci skip] Translation update 2021-06-06 00:19:43 +00:00
Raman Gupta 19c16e079f
Add separate ozone sensor for climacell (#51182) 2021-05-28 23:24:01 +02:00
tkdrob c0656878db
Normalize async_setup_entry (#51161) 2021-05-27 15:56:20 +02:00
HomeAssistant Azure 7df47664e8 [ci skip] Translation update 2021-05-12 00:04:03 +00:00
Raman Gupta 9f1b1c6c56
Add value map for Climacell V3 pollen sensors (#50200) 2021-05-06 21:12:51 -07:00
Milan Meulemans 29d72714f3
Replace dict with DeviceInfo (#49950)
* Replace dict with DeviceInfo

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-02 00:37:19 +02:00
Franck Nijhof d4d0b93d3b
Clean up connection classes in integrations A-C (#49888) 2021-04-30 21:01:52 -10:00
Ruslan Sayfutdinov cbaeec2a4e
Use AddEntitiesCallback type, pt.2 (#49921) 2021-04-30 20:38:59 +02:00
Ruslan Sayfutdinov 183220008d
Rename FlowResultDict to FlowResult (#49847) 2021-04-29 13:40:51 +02:00
Raman Gupta 105504cb89
Set ClimaCell API limit to 500 requests/day (#49828) 2021-04-28 13:43:07 -07:00
J. Nick Koston 51be2f860a
Reduce boilerplate to setup config entry platforms A-C (#49681)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-26 07:46:55 -10:00
HomeAssistant Azure 32dfaccf1f [ci skip] Translation update 2021-04-24 00:03:34 +00:00
Milan Meulemans 48695869f9
Change dict[str, Any] to FlowResultDict (#49546) 2021-04-22 17:23:15 -10:00
HomeAssistant Azure 69c1721c2a [ci skip] Translation update 2021-04-22 00:02:50 +00: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
HomeAssistant Azure a67a45624d [ci skip] Translation update 2021-04-19 00:04:29 +00: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
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
HomeAssistant Azure e86aad34b9 [ci skip] Translation update 2021-04-15 00:02:56 +00:00
HomeAssistant Azure c7d19d5115 [ci skip] Translation update 2021-04-12 00:04:19 +00:00
Raman Gupta 34a1dd4120
Add new attributes to Climacell (#48707)
* Add new attributes to Climacell

* fix logic

* test new properties
2021-04-11 11:59:42 +02:00
HomeAssistant Azure 45a92f5791 [ci skip] Translation update 2021-04-11 00:04:41 +00:00
HomeAssistant Azure a36712509b [ci skip] Translation update 2021-04-10 00:03:44 +00:00
HomeAssistant Azure 23dd57a562 [ci skip] Translation update 2021-04-09 00:03:15 +00:00
HomeAssistant Azure 8e6238ff61 [ci skip] Translation update 2021-04-08 00:03:23 +00:00
HomeAssistant Azure 82cc5148d7 [ci skip] Translation update 2021-04-07 00:04:06 +00:00
HomeAssistant Azure e8cbdea881 [ci skip] Translation update 2021-04-06 00:04:07 +00:00
Raman Gupta d0b3f76a6f
Add ClimaCell v4 API support (#47575)
* Add ClimaCell v4 API support

* fix tests

* use constants

* fix logic and update tests

* revert accidental changes and enable hourly and nowcast forecast entities in test

* use variable instead of accessing dictionary multiple times

* only grab necessary fields

* add _translate_condition method ot base class

* bump pyclimacell again to fix bug

* switch typehints back to new format

* more typehint fixes

* fix tests

* revert merge conflict change

* handle 'migration' in async_setup_entry so we don't have to bump config entry versions

* parametrize timestep test
2021-04-05 13:39:39 -04:00
Marc Mueller 2956eb0902
Update pylint to 2.7.3 (#48488)
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
2021-03-29 18:02:56 -10:00
Franck Nijhof bb9da22a84
Clean up superfluous integration setup - part 3 (#48484) 2021-03-29 13:23:44 -10:00
J. Nick Koston a851bff95a
Create async_config_entry_first_refresh to reduce coordinator boilerplate (#48451) 2021-03-29 12:51:39 -10:00