1
mirror of https://github.com/home-assistant/core synced 2024-08-28 03:36:46 +02:00
Commit Graph

25 Commits

Author SHA1 Message Date
epenet
d0c38c1e12
Move icon constants to entity attributes (#90518)
* Move icon constants to attribute

* Adjust test
2023-03-31 09:34:17 +02:00
Erik Montnemery
1450b44c63
Sort manifests 7 (#87028) 2023-02-08 20:32:43 +01:00
Franck Nijhof
5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00
epenet
420733a064
Improve entity type hints [n] (#77824) 2022-09-05 07:53:55 -05:00
epenet
dff9baf880
Use _attr_should_poll in components [j-n] (#77357) 2022-08-26 21:19:37 +02:00
Marc Mueller
9b9b553521
Disable no-self-use [pylint] (#70641)
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
J. Nick Koston
5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Franck Nijhof
4c83ecd7bd
Fix incorrect usage of ToggleEntity in switch platforms (#64620)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2022-01-21 13:17:45 +01:00
epenet
24314f1b11
Use Platform enum in load_platform [m-z] (#63751) 2022-01-10 10:45:11 +01:00
epenet
e4a88e921f
Add switch setup type hints [n-r] (#63304)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:24:34 +01:00
epenet
80b6195505
Add sensor setup type hints [m-n] (#63314)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:09:36 +01:00
epenet
33e4251606
Add binary_sensor setup type hints [h-n] (#63269)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 11:32:26 +01:00
epenet
b6909feb8b
Add init type hints [n-o] (#63190)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-01 13:39:38 -08:00
Erik Montnemery
103e21c278
Move temperature conversions to sensor base class (5/8) (#54475) 2021-08-12 13:26:17 +02:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery
c900e3030b
Migrate integrations n-q to extend SensorEntity (#48214) 2021-03-22 19:46:46 +01:00
Henning Claßen
3ebc262b7f
Upgrade numato-gpio to 0.10.0 (#47539)
This adds support for devices sending '\n\r' end-of-line sequences.
2021-03-11 22:54:27 +01:00
Paulus Schoutsen
4d5948b4d0
Use dict syntax (#41325) 2020-10-06 15:02:23 +02:00
springstan
7de1fe7416
Use percentage constant in more integrations (#40165) 2020-09-19 10:30:22 -05:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
clssn
428c376fe4
Update numato-gpio to 0.8.0 (#38415)
* Bump the numato-gpio dependency

This relaxes the pyserial dependency to >=3.1.1 as requested by the
project with respect to the upcoming, stricter pip resolver.

* Update numato-gpio due to deprecation of class BinarySensorDevice
2020-08-02 16:35:21 -05:00
Franck Nijhof
ddb85cee7b
Remove internal qa scale from numato integration (#36629) 2020-06-10 22:55:17 +02:00
clssn
15b1a9ecea
Add numato integration (#33816)
* Add support for Numato 32 port USB GPIO boards

Included are a binary_sensor, sensor and switch component
implementations. The binary_sensor interface pushes updates via
registered callback functions, so no need to poll here.

Unit tests are included to test against a Numato device mockup.

* Refactor numato configuration due to PR finding

* Resolve minor review findings

* Bump numato-gpio requirement

* Load numato platforms during domain setup

According to review finding

* Guard from platform setup without discovery_info

According to review finding

* Move numato API state into hass.data

According to review finding.

* Avoid side effects in numato entity constructors

According to review finding

* Keep only first line of numato module docstrings

Removed reference to the documentation. Requested by reviewer.

* Minor improvements inspired by review findings

* Fix async tests

Pytest fixture was returning from the yield too early executing teardown
code during test execution.

* Improve test coverage

* Configure GPIO ports early

Review finding

* Move read_gpio callback to outside the loop

Also continue on failed switch setup, resolve other minor review
findings and correct some error messages

* Bump numato-gpio requirement

This fixes a crash during cleanup. When any device had a communication
problem, its cleanup would raise an exception which was not handled,
fell through to the caller and prevented the remaining devices from
being cleaned up.

* Call services directly

Define local helper functions for better readability.
Resolves a review finding.

* Assert something in every test

So not only coverage is satisfied but things are actually tested
to be in the expected state.
Resolves a review finding.

* Clarify scope of notification tests

Make unit test for hass NumatoAPI independent of Home Assistant (very basic test of notifications).
Improve the regular operations test for notifications.

* Test for hass.states after operating switches

Resolves a review finding.

* Check for wrong port directions

* WIP: Split numato tests to multiple files

test_hass_binary_sensor_notification still fails.

* Remove pytest asyncio decorator

Apears to be redundant. Resolves a review finding.

* Call switch services directly.

Resolves a review finding.

* Remove obsolete inline pylint config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Improve the numato_gpio module mockup

Resolves a review finding.

* Remove needless explicit conversions to str

Resolves review findings.

* Test setup of binary_sensor callbacks

* Fix test_hass_binary_sensor_notification

* Add forgotten await

Review finding.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-30 14:23:30 +02:00