Commit graph

54 commits

Author SHA1 Message Date
Matthias Alphart
77edc149ec
Add distinct import / export entities to Fronius (#116535) 2024-06-22 11:12:21 +02:00
Matthias Alphart
70ae082281
Use entry.runtime_data in Fronius (#116604) 2024-05-02 13:42:48 +02:00
Marc Mueller
0e3945ca6c
Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
Joost Lekkerkerker
e8837a4026
Add icon translations to Fronius (#111608) 2024-02-28 12:04:49 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Matthias Alphart
5550dcbec8
Add textual representation entities for Fronius status codes (#94155)
* optionally decouple `EntityDescription.key` from API response key

this makes it possible to have multiple entities for a single API response field

* Add optional `value_fn` to EntityDescriptions

eg. to be able to map a API response value to a different value (status_code -> message)

* Add inverter `status_message` entity

* Add meter `meter_location_description` entity

* add external battery state

* Make Ohmpilot entity state translateable

* use built-in StrEnum

* test coverage

* remove unnecessary checks

None is handled before
2023-11-27 13:59:25 +01:00
Matthias Alphart
76115ce766
Fix Fronius entity initialisation (#103211)
* Use None instead of raising ValueError if value invalid

* use async_dispatcher_send
2023-11-02 09:13:04 +01:00
Matthias Alphart
fb13d9ce7c
Set Fronius entities to "unknown" when receiving invalid zero value (#102270) 2023-10-25 06:27:46 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Björn Weitzel
4b2cbbe8c2
Use dispatcher helper to add new Fronius inverter entities (#96782)
Using dispatcher to add new entities for inverter
2023-07-18 23:18:02 +02:00
Björn
e29b6408f6
Periodically re-scan for Fronius inverters that were offline while setup (#96538) 2023-07-17 10:16:28 +02:00
Matthias Alphart
edaee89e34
Use entity name translations in Fronius (#90463) 2023-04-03 20:05:52 +02:00
Matthias Alphart
3dd3cb195f
Set default value for some Fronius entities (#89475) 2023-03-28 08:23:53 +02:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Matthias Alphart
88356a95e6
Use power factor device class in Fronius integration again (#85495) 2023-01-09 10:42:49 +01:00
Franck Nijhof
fa55ba72a4
Fix incorrect power factor device class usage in Fronius (#84374) 2022-12-21 22:43:50 +01:00
epenet
0f40a73bb4
Use new unit enums in fronius (#84224) 2022-12-19 11:58:24 +01:00
epenet
0184aadb09
Use UnitOfElectricPotential in integrations (#84044) 2022-12-15 13:59:21 +01:00
epenet
946d5535b4
Use UnitOfFrequency in integrations (#83915) 2022-12-13 11:47:06 +01:00
epenet
4fe025b297
Use UnitOfPower in integrations [a-g] (#83812) 2022-12-12 11:48:09 +01:00
epenet
7c3ca38eb7
Use UnitOfElectricCurrent in integrations (#83622) 2022-12-09 10:51:26 +01:00
epenet
248d5ff541
Use ApparentPower unit and device class in integrations (#83577) 2022-12-08 20:55:18 +01:00
Matthias Alphart
75abf87611
Migrate Fronius to new entity naming style (#74974) 2022-07-11 09:16:29 -07:00
Franck Nijhof
e69450f7ca
Remove deprecated YAML configuration from Fronius (#69032) 2022-03-31 22:38:54 +02:00
Matthias Alphart
9a396c1d16
remove unused constant (#68646) 2022-03-25 00:52:25 +02:00
JonasClever
b4bb35d4de
Fronius - change the unit of capacity from Ah to Wh (#68543) 2022-03-23 20:45:54 +02:00
Marc Mueller
354fc4c1ae
Update coordinator typing (2) [e-f] (#68462) 2022-03-21 14:13:16 +01:00
Matthias Alphart
0606b4a843
add apparent and reactive power DeviceClass (#65938) 2022-02-21 21:35:24 +01:00
epenet
eafece3651
Add setup type hints (part 1) (#63955)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-12 08:49:46 +01:00
Matthias Alphart
1cbcb9e2fd
Don't add Fronius entities with unknown state (#62282) 2021-12-19 11:49:21 +01:00
Matthias Alphart
4f9d4872a7
Fix unique_id of S0 meters connected to Fronius inverters (#61408) 2021-12-09 15:35:20 -08: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
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
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
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
f0cd87e031
Reduce precision in returned values to meaningful digits (#49382) 2021-05-23 21:06:58 +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
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