69 Commits

Author SHA1 Message Date
Joost Lekkerkerker
7a2592173b Add integration_type service to emoncms (#159003) 2025-12-15 09:57:53 +01:00
Franck Nijhof
4c07b2b290 Remove template engine dependency in EmonCMS (#157045) 2025-11-22 14:48:44 +01:00
Alexandre CUER
bfa1116115 Add quality scale to Emoncms (#149727)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-11-13 16:10:29 +01:00
Robert Resch
96f84b2b99 Sort homeassistant json files (#155285) 2025-10-28 10:33:10 +01:00
Alexandre CUER
74660da2d2 Bump pyemoncms to 0.1.3 (#152436) 2025-09-16 18:32:13 +02:00
Jan Bouwhuis
48300f4563 Use greek small letter mu "\u03bc" instead of micro sign "\u00B5" for micro unit prefix (alt 1) (#144853)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-08-19 18:48:50 +02:00
Alexandre CUER
d539f37aa4 Remove CONF_EXCLUDE_FEEDID constant from the emoncms integration (#150333) 2025-08-10 09:52:17 +02:00
Alexandre CUER
dff4f79925 Remove useless strings from emoncms (#150182) 2025-08-08 22:00:48 +02:00
Alexandre CUER
9616c8cd7b Bump pyemoncms to 0.1.2 (#149825) 2025-08-01 20:04:16 +01:00
Alexandre CUER
9f1cec893e emoncms - fix missing data descriptions (#149733) 2025-08-01 13:22:46 +02:00
G Johansson
51d38f8f05 Use OptionsFlowWithReload in emoncms (#149094) 2025-07-19 21:06:14 +02:00
Alexandre CUER
87b00fdc7b Emoncms add reconfigure flow (#145108)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-07-08 07:28:16 +02:00
Alexandre CUER
97c1e21a69 Add possibility to synchronize automatically all available feeds in emoncms (#128122)
* Add checkbox in options to sync all feeds once

* Add sync mode selector in async_step_user
Remove checkbox in options

* Correct use of SYNC_MODE & SYNC_MODE_AUTO in tests

* Use dropdown for mode selection

* rmv_unused_const

* Add separate tests + use SelectSelector
2025-06-30 10:05:07 +02:00
Joost Lekkerkerker
f00dfd32d4 Remove config import in EmonCMS (#142624) 2025-04-14 14:30:41 +02:00
Christopher Fenner
1579e90d58 Fix typos in strings.json files (#138601)
* fix codespell issues

* update nextcloud snapshots

* update weheat snapshots

* update waqi snapshots
2025-02-18 22:36:28 +01:00
Erik Montnemery
f83c8de8d3 Update signature of platforms' async_setup_entry (#138201) 2025-02-10 21:08:03 +01:00
Michael
e9bfb6baee Explicitly pass in the config_entry in emoncms coordinator (#137743) 2025-02-08 00:04:05 +00:00
epenet
a9433ca697 Standardize homeassistant imports in component (e-f) (#136824) 2025-01-29 11:36:22 +01:00
Norbert Rittel
e433c2250c Several strings fixes in the emoncms integration (#135792) 2025-01-16 23:22:28 +01:00
Ville Skyttä
1426c421f3 Use percent formatting in logging per guidelines (#135550) 2025-01-14 11:15:38 +01:00
Alexandre CUER
6a54edce19 Gives a friendly name to emoncms entities if unit is not specified (#133358) 2024-12-16 19:26:47 +01:00
Alexandre CUER
f1655c5d1a Use SensorEntityDescription in emoncms (#130451) 2024-11-26 19:25:00 +01:00
Alexandre CUER
24b47b50ea Migrate from entry unique id to emoncms unique id (#129133)
* Migrate from entry unique id to emoncms unique id

* Use a placeholder for the documentation URL

* Use async_set_unique_id in config_flow

* use _abort_if_unique_id_configured in config_flow

* Avoid single-use variable

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Add async_migrate_entry

* Remove commented code

* Downgrade version if user add server without uuid

* Improve code quality

* Move code migrating HA to emoncms uuid to init

* Fit doc url in less than 88 chars

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Improve code quality

* Only update unique_id with async_update_entry

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Make emoncms_client compulsory to get_feed_list

* Improve readability with unique id functions

* Rmv test to give more sense to _migrate_unique_id

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-11-08 13:29:10 +01:00
epenet
a7ba4bd086 Use read-only options in emoncms options flow (#129926)
* Use read-only options in emoncms options flow

* Don't store URL and API_KEY in entry options
2024-11-06 13:09:05 +01:00
Alexandre CUER
6caa4baa00 Fix missing translation string in emoncms (#129859) 2024-11-05 14:58:25 +01:00
epenet
8b6c99776e Cleanup unnecessary OptionsFlowWithConfigEntry (part 1) (#129752)
* Cleanup unnecessary OptionsFlowWithConfigEntry

* Fix emoncms

* Fix imap

* Fix met

* Fix workday
2024-11-03 22:57:18 +01:00
Alexandre CUER
a3cd74e30b Bump pymoncms library to version 0.1.1 (#129135) 2024-10-25 14:15:35 +02:00
Alexandre CUER
8255728f53 Migrate emoncms to config flow (#121336)
* Migrate emoncms to config flow

* tests coverage 98%

* use runtime_data

* Remove pyemoncms bump.

* Remove not needed yaml parameters add async_update_data to coordinator

* Reduce snapshot size

* Remove CONF_UNIT_OF_MEASUREMENT

* correct path in emoncms_client mock

* Remove init connexion check
as done by config_entry_first_refresh
since async_update_data catches exceptionand raise UpdateFailed

* Remove CONF_EXCLUDE_FEEDID from config flow

* Update homeassistant/components/emoncms/__init__.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/emoncms/sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/emoncms/strings.json

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use options in options flow and common strings

* Extend the ConfigEntry type

* Define the type explicitely

* Add data description in strings.json

* Update tests/components/emoncms/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/emoncms/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Add test import same yaml conf + corrections

* Add test user flow

* Use data_description...

* Use snapshot_platform in test_sensor

* Transfer all fixtures in conftest

* Add async_step_choose_feeds to ask flows to user

* Test abortion reason in test_flow_import_failure

* Add issue when value_template is i yaml conf

* make text more expressive in strings.json

* Add issue when no feed imported during migration.

* Update tests/components/emoncms/test_config_flow.py

* Update tests/components/emoncms/test_config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-03 17:21:13 +02:00
Erik Montnemery
b9010e96a0 Remove unnecessary assignment of Template.hass from emoncms (#123668) 2024-08-12 14:52:51 +02:00
Alexandre CUER
fcccd85ac4 Add tests to emoncms (#122547)
* Add tests to emoncms

* Reduce snapshot size

* Reduce snapshot size

* run hassfest to update CODEOWNERS file

* Update requirements_test_all.txt

* Update tests/components/emoncms/test_sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Dont use snapshot when testing state change

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-07-24 21:40:05 +02:00
Alexandre CUER
489457c47b Add async_update_data to emoncms coordinator (#122416)
* Add async_update_data to coordinator

* Add const module
2024-07-22 21:47:01 +02:00
epenet
c49fce5541 Force alias when importing sensor PLATFORM_SCHEMA (#120536) 2024-06-26 12:14:13 +02:00
Alexandre CUER
cb045a794d Add coordinator to emoncms (#120008) 2024-06-22 12:41:54 +02:00
Alexandre CUER
6dc680d251 Use aiohttp.ClientSession in EmoncmsClient (#119989) 2024-06-19 22:41:32 +02:00
Alexandre CUER
442554c223 Migrate Emoncms to external library (#119772)
* Migrate Emoncms to external library

https://github.com/Open-Building-Management/pyemoncms

* Remove the throttle decorator

* Remove MIN_TIME_BETWEEN_UPDATES as not used
2024-06-17 13:59:47 +02:00
Alexandre CUER
a1e4d4ddd7 Remove duplicate code in emoncms (#118610)
* Remove duplicate & property extra_state_attributes

* Add methods _update_attributes and _update_value

* correction in _update_value

* Update homeassistant/components/emoncms/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/emoncms/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/emoncms/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/emoncms/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-04 10:56:43 +02:00
Alexandre CUER
1f922798d8 Add new codeowner for emoncms integration (#118609)
adding new codeowner
2024-06-01 21:14:18 +02:00
Alexandre CUER
8a3b49434e Code quality improvements in emoncms integration (#118468)
* type hints
remove unused var interval

* corrections as suggested by epenet

* reintroducing property extra_state_attributes
so that the extra parameters update correctly
2024-05-31 11:50:18 +02:00
Marc Mueller
0e3945ca6c Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
Erik Montnemery
78c9b70c8d Sort manifests 3 (#87024) 2023-02-08 20:19:19 +01:00
Franck Nijhof
5e81d28116 Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Marc Mueller
1cc8feabb7 Remove unnecessary try-else (1) (#86158) 2023-01-18 14:24:52 +01:00
Franck Nijhof
b0cee0bc46 String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
epenet
4fe025b297 Use UnitOfPower in integrations [a-g] (#83812) 2022-12-12 11:48:09 +01:00
epenet
3a3f41f3df Improve entity type hints [e] (#77041) 2022-08-20 07:52:55 +02:00
Alastair D'Silva
f7c23fe193 Handle EmonCMS feeds that return NULL gracefully (#76074) 2022-08-11 00:09:37 +02:00
ablack89
1b64dbec67 EmonCMS - Set device and state class for more feed units (#69872)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-04-11 19:37:53 +02:00
epenet
2709db008c Remove invalid return values in setup methods [a-h] (#63362)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-04 11:08:28 +01:00
epenet
980f22244c Use new DeviceClass and StateClass enums in emoncms (#61381)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-10 09:07:17 +01:00
Ville Skyttä
8bc1509afa Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[de]* (#57990) 2021-10-22 16:28:56 +02:00