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

11 Commits

Author SHA1 Message Date
Erik Montnemery
339a56e434
Migrate integrations f-h to extend SensorEntity (#48212) 2021-03-22 19:45:17 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
J. Nick Koston
5a907095e5
Remove logging from state in flume (#42126) 2020-10-20 16:41:06 +02:00
J. Nick Koston
37df7bf4c5
Convert flume to use DataUpdateCoordinator (#42017)
* Convert flume to use DataUpdateCoordinator

* pylint

* Update homeassistant/components/flume/sensor.py

* Update homeassistant/components/flume/sensor.py
2020-10-18 13:44:36 -05:00
Chris Mandich
ae8a38757a
Update PyFlume version, support for multiple state attributes (#38138)
* Update PyFlume version, support for multiple state attributes

* Update PyFlume to resolve issue https://github.com/ChrisMandich/PyFlume/issues/7

* Update PyFlume package to 0.5.2, flatten values in sensor

* Delete setup

* Remove 'current_interval' from attributes and round values to 1 decimal place.

* Add missing brackets to remove 'current_interval' from attributes

* Set attribute keys explicitly, check attribute format.

* Breakout intervals into separate sensors.

* Update 'unit_of_measurement' for each sensor, update sensor 'available', remove unusued variables

* Update "Device unique ID."

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update PyFlume, resolve API query update for request.

* Cleanup debug logging

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-27 21:30:38 -10:00
Quentame
1855c91988
Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const (#36233)
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const

* Fix pylint

* Use in tests

* Search for "client_id"

* Fix tests

* Fix test

* Fix test
2020-05-30 17:27:20 +02:00
J. Nick Koston
daf941e771
Fix missed async conversion in flume. (#33855) 2020-04-08 20:40:45 -05:00
J. Nick Koston
ac9429988b
Add a config flow for flume (#33419)
* Add a config flow for flume

* Sensors no longer block Home Assistant startup
since the flume api can take > 60s to respond on
the first poll

* Update to 0.4.0 to resolve the blocking startup issue

* Missed conversion to FlumeAuth

* FlumeAuth can do i/o if the token is expired, wrap it

* workaround async_add_entities updating disabled entities

* Fix conflict
2020-04-08 16:29:59 -05:00
J. Nick Koston
1119da7e8a
Flume Cleanups (unique id, fix missing timeout, http session,… (#32384)
* Flume Cleanups

* Sensors now show the name

* include_devices and exclude_devices are now available in the config.

* Address review items

* bump as 0.3.0 is published
2020-03-03 09:22:26 -08:00
Chris Mandich
6dd496deb4 Fix loading flume integration (#29926)
* Fix https://github.com/home-assistant/home-assistant/issues/29853

* Run script.gen_requirements

* Update to store Token File in config directory

* Update to store Token File in config directory

* Update to store Token File in config directory
2019-12-15 03:45:29 +01:00
Chris Mandich
08432c7c09 Add flume support (#27235)
* Add Flume Sensor

Add support for Flume API and sensor

* Add support for choosing timezone

Timezone is now a required option in configuration.yaml

* Add Flume to coveragerc and CODEOWNERS

Add flume to be ommited from testing. Add @ChrisMandich as Flume Code owner

* Revert "Add Flume to coveragerc and CODEOWNERS"

This reverts commit 0b27437a3b.

* Update manifest.json

Added Documentation URL for Flume to HASS.IO

* Update manifest.json

Added missing Newline at EOF.

* Update sensor.py

Update sensor to not required Device ID for configuration. Now loops through all available Type 2 devices and adds them as an entity.

* Update Manifest, CODEOWNERS, and manifest.json

Resolved errors related to code owners and requirements. Using hassfest and gen_requirements_all

* Update sensor.py

Implemented recommendations from @Quentame. Including time zone from Home Assistant, Updated variable names, and Consolidated duplicate functions.

* Implemented suggested changes from @Quentame

This includes: components name, using f-strings instead of concat, snake_case for variables, constants for the addition of future device types, clearer errors, and removed variables no longer in use.

* Update sensor.py

Restored unit_of_measurement. Updated return to "gal".

* Address pylint errors

* Update sensor.py

Include protected attributes in setup_platform.

* Address Pylint errors

homeassistant/components/flume/sensor.py:63:11: W0703: Catching too general exception Exception (broad-except)
homeassistant/components/flume/sensor.py:133:8: R1720: Unnecessary "else" after "raise" (no-else-raise)
homeassistant/components/flume/sensor.py:162:8: R1705: Unnecessary "else" after "return" (no-else-return)
homeassistant/components/flume/sensor.py:236:8: R1720: Unnecessary "else" after "raise" (no-else-raise)

* Update sensor.py

I'm okay with the broad exception clause.
homeassistant/components/flume/sensor.py:65:11: W0703: Catching too general exception Exception (broad-except)

* Update sensor.py

Add more specific exceptions for Try/Except.

* Update Flume Sensory.py

add requirements, exclude from tests, us pyflume pypi package.

* Update sensor.py to support latest pyflume package

* Update manifest

provide better flow of manifest and easier readibility.

* Update manifest.json

Reccomended by @balloob as it is already a core requirement

* Update sensor.py

Add proposed changes from @balloob

* Update requirements_all.txt

pytz is a core dependency, removing flume's requirement for it.

* Update sensor.py

Added @MartinHjelmare recommended changes.

* Update sensor.py

Resolving PyLint error

* Update sensor.py

Remove `KeyError`. Add length check for flume entity list before adding.

* Update sensor.py

* Update pyflume version

* Update imports with isort

* Add line break between standard library and thirdparty imports.

* Remove throttle from sensor.py
2019-11-23 09:55:46 +01:00