Commit Graph

47 Commits (44b7c0e65cf898dfb7afc281c235d30d9e579b07)

Author SHA1 Message Date
GitHub Action 0aaf9459ab [ci skip] Translation update 2021-12-10 00:13:29 +00:00
Matthias Alphart 4f9d4872a7
Fix unique_id of S0 meters connected to Fronius inverters (#61408) 2021-12-09 15:35:20 -08:00
GitHub Action 1f1a29cada [ci skip] Translation update 2021-12-09 00:13:16 +00:00
GitHub Action d69c6e3ab3 [ci skip] Translation update 2021-12-08 00:13:50 +00:00
Matthias Alphart ac263acb1c
Don't use ConfigEntry update listener for Fronius (#61017)
* disable `async_setup_entry` in config_flow tests

* don't use config_entry update listener

* add `Final` to constants

* assert that an updated entry causes a reload (unload)
2021-12-05 23:29:39 +01:00
GitHub Action fa5f524fdb [ci skip] Translation update 2021-12-05 00:14:27 +00:00
Marc Mueller cd1b923e16
Use platform enum (2) [E-G] (#60933) 2021-12-04 13:26:40 +01:00
GitHub Action 68ca0a05c8 [ci skip] Translation update 2021-12-04 00:13:16 +00:00
Matthias Alphart 40f1b0d3a5
Add quality scale for Fronius (#60531) 2021-12-03 19:43:01 +01:00
Matthias Alphart 77cd751543
DHCP discovery for Fronius integration (#60806)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-03 18:29:15 +01:00
Matthias Alphart c0fb1bffce
Use Enums in EntityDescriptions in Fronius (#60832) 2021-12-02 12:43:59 +01:00
Matthias Alphart f2f6602890
Add support for Ohmpilots to Fronius integration (#60765)
* add support for Fronius Ohmpilot

* disable the debugger
2021-12-02 11:05:22 +01:00
Matthias Alphart e5e1e7b7e0
Update pyfronius to 0.7.1 (#60722) 2021-12-01 13:30:25 +01:00
GitHub Action c9589f763c [ci skip] Translation update 2021-12-01 00:17:12 +00:00
GitHub Action 3af54d96c7 [ci skip] Translation update 2021-11-28 00:14:19 +00:00
Matthias Alphart 2a0c1fa074
don't issue requests for non-existing devices (#60416) 2021-11-27 19:56:00 +01:00
GitHub Action 96313bbbe0 [ci skip] Translation update 2021-11-27 00:12:17 +00:00
GitHub Action 78b47019f9 [ci skip] Translation update 2021-11-26 00:12:49 +00:00
Marc Mueller de78c4f0f8
Import Callable from collections.abc (#60354) 2021-11-25 22:23:48 +01:00
GitHub Action d3c020325b [ci skip] Translation update 2021-11-25 00:13:33 +00:00
Matthias Alphart c808fa8d3d
fix configuration url (#60311) 2021-11-24 23:27:13 +01:00
Matthias Alphart 1a5f2c9c32
Disable less popular Fronius entities by default (#60264) 2021-11-24 11:17:38 +01:00
Matthias Alphart 3dac661480
Rewrite Fronius integration (#59686)
* Add unique_id and use DataUpdateCoordinator in Fronius (#57879)

* initial refactoring commit - meters

- config_flow (no strings, no tests yet)
- import yaml config
- FroniusSolarNet class for holding Fronius object , coordinators and some common data
- meter descriptions
- update coordinator
- entities (including devices)

* storage controllers

* error handling on init; inverter unique_id

* inverters

* power_flow

* fix VA, var, varh not valid for device_class power/energy

and add custom icons

* add SolarNet device for system wide values

* cleanup

* config_flow strings

* test config_flow

* use pyfronius 0.7.0

* enable strict typing

* remove TODO comments

* fix lint errors; move FroniusSensorEntity to sensor.py

* power_flow as optional coordinator

API V0 doesn't support power_flow endpoint

* show error message in logs

* prevent parallel requests to one host

* logger_info coordinator

* store FroniusSolarNet reference directly in coordinator

* cleanup coordinators when unloading entry

* round floats returned by Fronius API

* default icons for grid im/export tariffs

* small typing fix

* Update homeassistant/components/fronius/sensor.py

Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>

* DC icons

* prepend names with "Fronius" and device type

to get more reasonable default entity_ids (eg. have them next to each other when alphabetically sorted)

* remove config_flow and devices

* rename _FroniusUpdateCoordinator to FroniusCoordinatorBase

and mark ABC

* move SensorEntityDescriptions to sensor.py

* Revert "move SensorEntityDescriptions to sensor.py"

This reverts commit 2e5a726eb6.

* Don't raise ConfigEntryNotReady and use regular refresh method

* move bridge initialization out of helper class

* no coverage tests

* power_flow update interval 10 seconds

* move SensorEntityDescriptions to sensor.py

without introducing a circular dependency

* deprecation warning for CONF_MONITORED_CONDITIONS

* remove extra_state_attributes form meter sensor entities

* readd diagnostic entities

* decouple default entity_id from default name

* use key instead of name for entity_id

and make deprecated config key optional

* adjust tests

* use old entity_ids

these changes are now backwards compatible

* check coverage

* simplify entity description definitions

* restore entity names of previous implementation

Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>

* Add config_flow for Fronius integration (#59677)

* Cleanup Fronius config_flow and tests (#60094)

* Add devices to Fronius integration (#60104)

* New entity names for Fronius entities (#60215)

* Adaptive update interval for Fronius coordinators (#60192)

Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>
2021-11-24 02:04:36 +01:00
Matthias Alphart c0a3c7a4b7
Update pyfronius to 0.7.0 (#57279)
* update to pyfronius 0.7.0

* exception handling

* exception handling
2021-10-11 04:37:44 +02:00
Niels Mündler 6d049c724c
Add support for logger info in fronius integration (#54795)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-08-22 18:57:18 +02:00
Erik Montnemery 6aca3b326f
Remove `last_reset` attribute and set state class to `total_increasing` for fronius energy sensors (#54830) 2021-08-18 16:57:19 +02:00
Niels Mündler 346310ccaf
Bump pyfronius version to 0.5.5 (#54758)
- allows for trailing slashes in configuration (which would otherwise cause errors in the newest fronius firmware)
- fixes units of energy related sensors
2021-08-17 14:59:56 +02:00
Erik Montnemery 87e7a8fb5f
Move temperature conversions to sensor base class - new integrations (#54623)
* Move temperature conversions to sensor base class

* Tweaks

* Update pvpc_hourly_pricing

* Fix flipr sensor

* Fix ezviz and youless sensor
2021-08-15 08:51:43 +02:00
Erik Montnemery 6de6a5dc14
Move temperature conversions to sensor base class (3/8) (#54469)
* Move temperature conversions to entity base class (3/8)

* Fix FritzBox sensor

* Fix tests
2021-08-12 14:23:56 +02:00
Niels Mündler 539ed56000
Refactor Fronius sensor device class and long term statistics (#54185) 2021-08-11 13:40:04 -07:00
Paulus Schoutsen 05a7853720
Add energy attributes to Fronius (#53741)
* Add energy attributes to Fronius

* Add solar

* Add power

* Only add last reset for total meter entities

* Only add last reset for total solar entities

* Create different entity descriptions per key

* only return the entity description for energy total

* Use correct key

* Meter devices keep it real

* keys start with energy_real

* Also device key starts with

* Lint
2021-07-29 23:34:03 -07:00
Niels Mündler f069fbdb25
Upgrade Fronius dependency to 0.5.3 (#52737)
supports more values of new Gen24 type of fronius device
2021-07-08 14:45:34 +02:00
Niels Mündler aececdfeb9
Update pyfronius to 0.5.2 (#52216)
* Update the pyfronius package to version 0.5.2

this automatically introduces support for API V0 of fronius devices

* Update requirements
2021-06-27 12:43:31 -05:00
Niels Mündler f0cd87e031
Reduce precision in returned values to meaningful digits (#49382) 2021-05-23 21:06:58 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery 339a56e434
Migrate integrations f-h to extend SensorEntity (#48212) 2021-03-22 19:45:17 +01:00
Marc Mueller 91df3fa904
Update typing 06 (#48039) 2021-03-17 23:49:01 +01:00
Niels Mündler f2ca4acff0
Limit fronius error messages on failed connection (#45824)
* Do not print several error messages on failed connection

* Change wrapping of exception, implement available

* Simplify exception flow

* Remove unnecessary init

* Add available property to actual entities

* Rebase and formatting
2021-02-15 18:28:28 +01:00
Matthias Alphart 93a9a11065
Add config validator helper positive_float (#41640) 2020-10-11 22:04:49 +02:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
springstan ad102b3840
Use f-strings in integrations starting with "F"and"G" (#32150)
* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
2020-02-24 17:54:20 -08:00
Bas Nijholt ca0fad2cbb Sort imports according to PEP8 for components starting with "F" (#29766) 2019-12-09 14:14:40 +01:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Niels Mündler 87bc2134ad Add each fronius sensor as own template (#25608)
* Fix formatting in history test

* Add each sensor as own template

* Make adapters non-entities

* Externalize and organize data fetching, improve system view

* Small fixes

Rename fetching adapters to adapters
throw away non-working system overviews
slightly change naming
remove scan_interval from schema
formatting

* Scan interval is already timedelta and unnecessary return

* Formatting

* Ensure better codestyle by storing cell variables explicitely in different places
2019-08-01 22:18:52 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Niels Mündler 333e1d6789 Fronius (solar energy and inverter) component (#22316)
* Introduced fronius component that adds ability to track Fronius devices from Home Assistant

* Use device parameter for fetching inverter data

* Fixed handling of default scope

* Handle exceptions from yield

* Fulfill PR requirements

* Fixed houndci violations

* Found the last hound violation

* Fixed docstring (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776934)

* Fixed import order with isort (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776957)

* CONF_DEVICE is now CONF_DEVICEID (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777161)

* Added docstring to class FroniusSensor (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777792)

* Fixed docstring for state (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777885)

* Added/fixed docstrings (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778108 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778125)

* Remove redundant log entry (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779213)

* Fixed error message if sensor update fails (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779435)

* Fixed error log messages (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779751 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779761)

* Satisfy hound

* Handle exceptions explicit (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940902)

* Removed unnecessary call of update (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940894)

* The point makes the difference.

* Removed unrelated requirements

* Remove config logging (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968748)

* Reorder and fix imports (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968725, https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968691)

* Update fronius requirement

* Various small fixes

* Small fixes

* Formatting

* Add fronius to coverage

* New structure and formatting

* Add manifest.json

* Fix data loading

* Make pylint happy

* Fix issues

* Fix parse_attributes

* Fix docstring and platform schema

* Make use of default HA-Const config values

* Change configuration setup, introducing list of monitored conditions

* Change the structure slightly, allowing for a list of sensors

* Remove periods from logging

* Formatting

* Change name generation, use variable instead of string

* small fixes

* Update sensor.py

* Incorporate correction proposals

* Setting default device inside validation

* Move import on top and small format

* Formatting fix

* Rename validation method to _device_id_validator
2019-06-28 20:48:52 -07:00