Commit Graph

122 Commits (081bf1cc394ca69829bca02a3b17e72e8b6d965e)

Author SHA1 Message Date
J. Nick Koston 81d2f5b791
Small cleanups to climate entity feature compat (#116361)
* Small cleanups to climate entity feature compat

Fix some duplicate property fetches, avoid generating a new
enum every time supported_features was fetched if there was
no modifier

* param

* param
2024-04-29 15:43:55 +02:00
Marc Mueller 816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +02:00
G Johansson c21d508c2d
Start deprecation of auxiliary heater in ClimateEntity (#112532)
* Start deprecation of auxiliary heater in ClimateEntity

* No issue for core integrations

* Remove unneded strings

* Move report to state_attributes
2024-03-27 16:10:32 +01:00
Marc Mueller 44eeb2eb5e
Allow Humidifier.current_humidity to be a float (#111297)
* Allow Humidifier.current_humidity to be a float

* Code review

* Allow climate humidity values to be float

* Update demo integration
2024-03-27 11:19:20 +01:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Jan Bouwhuis 554aefed42
Generate HomeAssistantError message from English translations (#113305)
* Fetch exception message from translation cache

* Improve tests

* Return translation key without path, cleanup

* Fetch translations when string variant is requested

* Move import

* revert changes ConfigValidationError

* mypy

* Remove _str__ method instead

* Type _message for mqtt template exception classes

* Revert changes made to test_config.py

* Undo changes TemplateError

* Follow up comments and test coverage
2024-03-16 22:56:48 +01:00
J. Nick Koston c3b5e819c5
Fix group loading too late resulting in incorrect state (#113262) 2024-03-13 19:18:15 -10:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Artur Pragacz 3392660537
Add toggle service to climate (#100418)
* Add toggle service to climate

* Fix mqtt test

* Add comments

* Fix rebase

* Remove not needed properties

* Fix toggle service

* Fix test

* Test

* Mod mqtt test

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-02-16 15:53:48 +01:00
G Johansson e877113b21
Add back logging for core for feature flags in climate (#109572) 2024-02-04 15:15:00 +01:00
G Johansson 61c82718f2
Don't log warning for core integrations on new feature flags in Climate (#109250)
* Don't log for core integration on Climate new feature flags

* Add test

* Fix test
2024-02-01 16:53:53 +01:00
G Johansson ddb56fe20d
Modify climate turn_on/off backwards compatibility check (#109195)
* Modify climate turn_on/off backwards compatibility check

* Fix logger message

* Comments

* Fix demo

* devolo

* ecobee

* Some more

* Fix missing feature flag

* some more

* and some more

* Remove demo change

* Add back demo change

* Fix demo

* Update comments
2024-01-31 16:29:36 +01:00
G Johansson bc720b48b4
Add TURN_OFF and TURN_ON to ClimateEntityFeature (#101673)
* Add ClimateEntityFeature.TURN_OFF

* Fixes

* Fixes

* wording

* Change to services

* Fixing

* Fixing

* Last bits

* Review comments

* Add hvac_modes checks

* Fixes

* Add tests

* Review comments

* Update snapshots

* balboa

* coolmaster

* ecobee

* mqtt

* nest

* plugwise

* smarttub

* whirlpool

* zwave_js

* fix test climate

* test climate

* zwave

* nexia

* nuheat

* venstar

* tado

* smartthings

* self.hvac_modes not None

* more tests

* homekit_controller

* homekit controller snapshot
2024-01-30 15:07:47 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
J. Nick Koston f3ecec9c44
Fix missed cached_property for hvac_mode in climate (#106692) 2023-12-29 14:12:19 -10:00
J. Nick Koston 552d4e49f0
Climate platform back-compat for custom components without ClimateEntityFeature (#106605) 2023-12-29 00:36:28 +01:00
G Johansson 83f4d3af5c
Implement mode validation in Climate entity component (#105745)
* Implement mode validation in Climate entity component

* Fix some tests

* more tests

* Fix translations

* fix deconz tests

* Fix switcher_kis tests

* not None

* Fix homematicip_cloud test

* Always validate

* Fix shelly

* reverse logic in validation

* modes_str

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-27 14:51:39 +01:00
J. Nick Koston 244a7bef39
Use faster contains check in climate (#106430) 2023-12-26 12:18:52 -10:00
J. Nick Koston 9052b89d63
Add support for attribute caching to the climate platform (#106266) 2023-12-23 11:29:33 -10:00
Robert Resch 494a897568
Deprecate deprecated climate constants (#106096) 2023-12-21 00:00:21 +01:00
Erik Montnemery 104bcc64b7
Allow inheriting base component entity descriptions in frozen dataclasses (#105512)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-15 23:33:50 -10:00
Erik Montnemery df73850f56
Move definition of attributes excluded from history to entity classes (#100430)
* Move definition of attributes excluded from history to entity classes

* Revert change which should be in a follow-up PR

* Fix sun unrecorded attributes

* Fix input_select unrecorded attributes
2023-09-21 15:02:47 +02:00
James Smith f24c4ceab6
Enable strict typing for Climate component (#99301)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-06 17:55:41 +02:00
J. Nick Koston 57c640c83c
Reduce attribute lookups in climate needed to write state (#97145) 2023-07-24 16:58:26 +02:00
Franck Nijhof d7b7deb95f
Improve climate turn_on service (#94645) 2023-06-27 20:17:13 +02:00
Franck Nijhof 21bdcd6b63
Remove str as a valid HVACMode & HVACAction type (#94644)
* Remove str as a valid HAVCMode type

* Adjust pylint plugin

* Also remove str from hvac_action property method
2023-06-15 20:16:17 +02:00
epenet d89ba40010
Use UnitOfTemperature in integrations (a-d) (#84304) 2022-12-20 17:59:20 +01:00
epenet 48cc3071bb
Enforce ClimateEntityFeature (#82329) 2022-11-22 07:08:53 +01:00
epenet da2efde354
Set alarm and climate supported features default (#82247) 2022-11-17 10:21:55 +01:00
epenet 39ac2c1101
Adjust type hints for ClimateEntityFeature (#82206) 2022-11-16 21:17:50 +01:00
Marc Mueller 0c8eeaa643
Update mypy to 0.990 (#81783)
* Update mypy to 0.990

* Remove type ignore - overriding attr with property (13475)

* Remove type ignores - hasattr (13544)

* Adjust type ignore - assignment (13549)

* New error code - type-abstract (13785)

* Disable annotation-unchecked (13851)
2022-11-08 14:41:39 +01:00
epenet 24c26dc032
Use unit_conversion in components (#79204)
* Use unit_conversion in components

* Two more
2022-09-28 16:05:31 +02:00
epenet 64988521bb
Make use of generic EntityComponent (part 2) (#78494) 2022-09-17 18:18:53 +02:00
epenet 7a3ca8278d
Expose climate constants at the top level (#78018)
* Expose climate constants at the top level

* Add new climate enums

* Add new climate enums

* Import new enums

* Adjust ClimateEntity

* Adjust pylint

* Fix mypy

* Revert "Fix mypy"

This reverts commit 3dbe2fab01.

* Revert "Adjust pylint"

This reverts commit b19b085b22.

* Revert "Adjust ClimateEntity"

This reverts commit 6a822c58f1.

* Revert "Import new enums"

This reverts commit 7d70007c60.

* Revert "Add new climate enums"

This reverts commit dcd7716106.

* Revert "Add new climate enums"

This reverts commit a9aaa08a1c.
2022-09-09 16:42:01 +02:00
epenet a75daab33f
Adjust set_hvac_mode type hint in ClimateEntity (#70658)
* Adjust set_hvac_mode type hint in ClimateEntity

* Remove override
2022-04-25 13:16:02 +02:00
epenet d22a679262
Adjust hvac_modes type hint in ClimateEntity (#70657)
* Adjust hvac_modes type hint in ClimateEntity

* Adjust tuya
2022-04-25 13:15:08 +02:00
Franck Nijhof bfc82b030f
Replace Climate CURRENT_HVAC_* constants with HVACAction enum (#70319) 2022-04-20 13:41:05 -07:00
Franck Nijhof a22f36178f
Replace Climate HVAC_MODE_* constants with HVACMode enum (#70286)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-20 13:20:53 +02:00
Franck Nijhof 8fc55b71c5
Add EntityFeature enum to Climate (#69077) 2022-04-01 09:41:49 -07:00
J. Nick Koston c16794968f
Consistently type/coerce climate humidity to be an int (#61456) 2022-01-06 02:09:43 +01:00
Franck Nijhof cf371ea8dd
Remove deprecated base entity classes (#61006)
* Remove deprecated base entity classes

* Clean up tests
2021-12-05 13:53:52 +01:00
Marc Mueller 69e413ac1e
Update pylint to 2.10.1 (#54963)
* Update pylint to 2.10.0

* useless-suppression

* Consider-using-tuple

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use dict.items()

* Add pylint disable

* Use pylint 2.10.1

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-21 10:41:23 +02:00
Franck Nijhof 0b44265232
Add description classes to entity components (#53521)
* Add description classes to entity components

* An -> A

* Add StateVacuumEntityDescription
2021-07-27 00:22:21 +02:00
Marc Mueller a56485a8c5
Revert new unit types (#53226) 2021-07-20 14:13:51 +02:00
Marc Mueller 71a8ae3016
Add new unit types for better type checking (#53124)
* Add new unit types
* Update helper functions
* Update components
* Update lcn climate
2021-07-18 14:43:47 +02:00
Erik Montnemery 44b44b5bd6
Enable basic type checking for climate (#52470)
* Enable basic type checking for climate

* Tweak
2021-07-03 16:06:12 +01:00
Franck Nijhof 7947946793
Type entry setup/unload for entity components (#51912) 2021-06-17 10:10:26 +02:00
Franck Nijhof 7dff4d6ad7
Define climate entity attributes as class variables (#51006) 2021-05-27 17:39:43 +02:00
tkdrob c0656878db
Normalize async_setup_entry (#51161) 2021-05-27 15:56:20 +02:00
Franck Nijhof 855b68faa1
Remove HomeAssistantType alias from entity components - Part 1 (#48467) 2021-03-29 13:24:36 -10:00