1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00
Commit Graph

85 Commits

Author SHA1 Message Date
Ernst Klamer
db4391adff
Add device class moisture (#77666) 2022-09-01 11:47:47 -04:00
Erik Montnemery
60c8d95a77
Remove white_value support from light (#76926) 2022-08-18 08:21:05 -04:00
G Johansson
90e1fb6ce2
Weather unit conversion (#73441)
Co-authored-by: Erik <erik@montnemery.com>
2022-06-23 10:48:30 +02:00
Erik Montnemery
23fa19b75a
Support restoring NumberEntity native_value (#73475) 2022-06-14 10:56:27 -07:00
Erik Montnemery
3da3503673
Add temperature unit conversion support to NumberEntity (#73233)
* Add temperature unit conversion to number

* Remove type enforcements

* Lint

* Fix legacy unit_of_measurement

* Address review comments

* Fix unit_of_measurement, improve test coverage
2022-06-14 09:40:57 +02:00
Erik Montnemery
b6575aa66b
Minor cleanup of test integration's cover platform (#72598) 2022-05-27 17:53:49 +03:00
Franck Nijhof
c31e788439
Rename current_version to installed_version in Update platform (#69093) 2022-04-01 20:11:17 +02:00
Joakim Sørensen
a81194cdd7
Add auto_update property to UpdateEntity (#69054) 2022-04-01 12:56:58 +02:00
epenet
496d90bf00
Prettify json (tests) (#68888) 2022-03-30 11:12:58 +02:00
Joakim Sørensen
9a150c2234
Add release_notes method to update entities (#68842) 2022-03-29 17:38:56 -07:00
Franck Nijhof
44d3a7e459
Adjust backup type of Update entity (#68553) 2022-03-23 11:20:04 +01:00
Franck Nijhof
073fb40b79
Add update entity platform (#68248)
Co-authored-by: Glenn Waters <glenn@watrs.ca>
2022-03-21 11:02:48 +01:00
Erik Montnemery
009b31941a
Support restoring SensorEntity native_value (#66068) 2022-02-08 14:00:26 -08:00
Paulus Schoutsen
2b4bb49eb7
Make device tracker entities work better (#63328)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-04 23:16:43 -08:00
Erik Montnemery
8e8e49d3e7
Add sensor device classes for apparent and reactive power (#62010) 2021-12-23 10:29:38 +01:00
Robert Hillis
499cae9900
Use enums for testing_config (#62140) 2021-12-17 11:10:06 +01:00
rianadon
09af85c6a4
Add native unit types for weather entities (#59533)
* Add native unit types for weather entities

* Update weatherentity and change precision in climacell test

* Move weather test to demo tests

* Add weather test for temperature conversion

* Add more unit conversion tests

* Remove extra native_ methods

* Remove extra properties and save precision change for another PR

* Remove visibility_unit from metoffice component

The vibility values given by metoffice are formatted into strings,
which means they can't automatically be converted.

* Improve docstrings and convert pressures in forecast

* Add precipitation and wind speed units

* Clean up tests

* Round converted weather values

* Round weather values to 2 decimal places

* Move number of rounding decimal places to constant

* Docstring and styles
2021-11-29 14:44:44 +01:00
epenet
a3885f4fda
Add frequency device class for sensor (#59700)
Co-authored-by: Hedda <rockerc.harley@gmail.com>
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-15 14:33:50 +01:00
Oliver Gruß
eec84ad71e
Mqtt cover toggle add stop function (#59233)
* Change existing toggle to add new function

* Fixed using old property method to using actual protected variable.

* Adding service tests to new cover toggle function

* Working on comments from Pull Request 59233

* Adjust existing tests to fit new fake cover setup

* MockCover is calling state method of MockEntity but should call it from CoverEntity

* using different entity to get back test coverage
2021-11-10 09:03:20 +01:00
Franck Nijhof
d126d88977
Add Button entity component platform (#57642)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-04 16:50:43 +01:00
Erik Montnemery
ee3e27c82a
Add support for white to light groups (#55082) 2021-08-23 18:29:44 +02:00
Jc2k
2dd4de060b
Add device class for volatile organic compounds (#55050) 2021-08-23 11:14:43 +02:00
Jc2k
de0460de61
Add device classes that were part of deprecated air quality entity (#54075) 2021-08-16 23:33:28 +02:00
Erik Montnemery
029873a088
Add support for total and total_increasing sensor state classes (#54523)
* Add support for amount and meter sensor state classes

* Ignore last_reset for STATE_CLASS_METER sensors

* Update tests

* Rename STATE_CLASS_METER to STATE_CLASS_AMOUNT_INCREASING

* Rename STATE_CLASS_AMOUNT to STATE_CLASS_TOTAL

* Fix typo

* Log warning if last_reset set together with state_class measurement

* Fix warning message
2021-08-13 12:35:23 +02:00
Bram Kragten
e23750b2a4
Add device class gas and enable statistics for it (#54110)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-11 09:58:19 -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
Jan Bouwhuis
8f014361d4
Validate Number value before calling entity method (#52343)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-04 11:57:26 +02:00
Jan Bouwhuis
8299d0a7c3
Validate Select option before calling entity method (#52352)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-08-04 11:12:42 +02:00
posixx
312531988a
Vacation Mode on Alarm Panels (#45980)
Co-authored-by: Nathan Tilley <nathan@tilley.xyz>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Khole Jones <ktech6@outlook.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-07-01 17:26:32 +02:00
Joakim Sørensen
5d6b6deed4
Move version validation to resolver (#51311) 2021-05-31 15:32:03 -07:00
Joakim Sørensen
2f10f59717
Block custom integrations with missing or invalid version (#49916) 2021-05-17 15:48:41 +02:00
Erik Montnemery
c2663d61d7
Add color_mode support to group light (#50165)
* Add color_mode support to group light

* Lint

* Update tests
2021-05-06 22:34:51 -07:00
Martin Hjelmare
ae67f300b2
Fix sync api use in alarm control panel test (#48725) 2021-04-06 16:50:15 +02:00
Martin Hjelmare
fdbef90a57
Remove device class timestamp from device condition and trigger (#48431)
* Remove unit from garmin connect

* Remove unit from hvv departures

* Remove device class timestamp from device condition and trigger

* Remove unit from systemmonitor

* Use device class constant for timestamp in ring
2021-04-01 15:05:10 +02:00
Erik Montnemery
5f2326fb57
Add support for light color modes (#47720)
* Add support for light color modes

* Update tests

* Update comments

* Fix bugs, add tests

* Suppress lint errors

* Don't suppress brightness when state is ambiguous

* Improve reproduce_state + add tests

* Add comment

* Change COLOR_MODE_* constants, rename COLOR_MODE_DIMMER to COLOR_MODE_BRIGHTNESS

* Fix tests

* Tweaks
2021-03-16 12:51:39 +01:00
Erik Montnemery
1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
Alexei Chetroi
79b5ca9415
Add device classes for CO and CO2 measurements (#47487) 2021-03-07 00:52:43 +01:00
Martin Hjelmare
a9a0f8938f
Move device tracker scanner attributes to ScannerEntity (#45312) 2021-01-19 11:04:08 -06:00
Simone Chemelli
7554c8d6c5
Add missing unit for signal strength (#40436)
* Added missing unit for signal strength

* Added one more unit

* Replaced string with variable

* Fixed wrong import

* Fix import

* Replaced string with variable

* Fixed wrong import

* Apply suggestions from code review

* Black

* Again a fix :-(

* iSort

* iSort after merge

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-10-01 16:14:29 +02:00
springstan
7de1fe7416
Use percentage constant in more integrations (#40165) 2020-09-19 10:30:22 -05:00
springstan
e330468a13
Use pressure constants in code base (#40262) 2020-09-19 09:26:08 +02:00
Chris Talkington
8a3279a5c9
Add device action support for remotes (#39400) 2020-09-07 08:54:18 -05:00
springstan
d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Paulus Schoutsen
b7ec0d4884 Remove stale print 2020-08-20 11:41:05 +00:00
Paulus Schoutsen
3dc79aa60a
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2020-08-19 14:57:38 +02:00
fabiocastagnino
02d572aae5
Add device classes for electrical measurement (#36800)
* added device classes for electrical measurement

(cherry picked from commit 2409fe19ed43bef568a0cca826652867d3a2d71a)

* upadte power factor unit (%)

* update power factor unit (%)
2020-08-08 21:04:18 +02:00
Ville Skyttä
435a88636a
Address new issues flagged by flake8 3.8.0a2 (#34964) 2020-04-30 21:37:58 +02:00
Erik Montnemery
e4333a7a44
Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
Erik Montnemery
8c5c963b96
Rename CoverDevice to CoverEntity (#34595) 2020-04-25 18:07:15 +02:00
Erik Montnemery
6f7f5b4034
Rename AlarmControlPanel to AlarmControlPanelEntity (#34590) 2020-04-25 18:05:28 +02:00