Commit Graph

19 Commits (e593ceaaf2acc7ae22a1086fc34e915dbd88413c)

Author SHA1 Message Date
epenet 8ed689fede
Add new rule to enforce relative imports in pylint (#77358)
* Add new rule to enforce relative imports in pylint

* Early return

* Adjust components
2022-08-29 08:55:32 +02:00
epenet 65eb1584f7
Improve entity type hints [a] (#76986) 2022-08-18 15:56:52 +02:00
epenet 0042bb68d9
Cleanup ADS constants and add type hints (#63390)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-14 12:58:12 +01:00
epenet 6ffd587788
Add basic type hints to ads (#62738)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-24 14:25:10 +01: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
Robert Hillis 4cac85e3f5
Use entity class attributes for ads (#52488)
* Use entity class attributes for ads

* fix

* Update homeassistant/components/ads/cover.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2021-07-05 12:03:16 +02:00
Erik Montnemery 9e9ba53f0e
Move SensorEntity last in the inheritance tree (#48230) 2021-03-22 20:05:13 +01:00
Erik Montnemery e0cd7072d6
Migrate integrations a-c to extend SensorEntity (#48210) 2021-03-22 12:37:16 +01:00
Philip Allgaier 625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +02:00
springstan c6c7dd10f5
Clean up access to config in various integrations (#33759) 2020-04-08 12:59:38 +02:00
Bas Nijholt f5a1b32be0 sort imports according to PEP8 for ads (#29613) 2019-12-08 13:43:32 +01:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
carstenschroeder 734a67ede0 Refactor of ADS integration and introduce ADSEntity (#22583)
* Prevent toogle to false at restart

* change to asyncio.run_coroutine_threadsafe

* refactor ADS platforms; introduce AdsEntity

* fix hound findings

* some formatting

* remove redundant def.

* fix useless super delegation

* fix inconsistent ADS data type for brightness

* fix requested changes

* fix comment
2019-03-31 20:28:43 -07:00
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
philipperequile 2b3c31cdb0 Add more ads plc types (#19801)
* Update __init__.py

Support for 2 new 4-byte PLC datatypes DINT and UDINT

* Update __init__.py

* Fix lint issue

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Support for 2 new PLC types

Sensor supports DINT and UDINT PLC types

* Update __init__.py

I removed unused TYPES = [ADSTYPE_INT, ADSTYPE_UINT, ADSTYPE_BYTE, ADSTYPE_DINT, ADSTYPE_UDINT]
2019-02-22 23:52:46 +01:00
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
carstenschroeder d1c8d39107 Add unique id to ADS platforms (#20511)
* Add friendly_name option

* Correct hound findings

* correct hound findings 2

* add unique id

* add unique id to all ads platforms
2019-02-12 18:42:09 +01:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00