Commit Graph

20 Commits (7a9849771098e66a6ed33771f92adcb10d7a3b29)

Author SHA1 Message Date
Myles Eftos 621c66a214
Update Amberelectric to use amberelectric version 2.0.12 (#125701)
* Add price descriptor attribute to price sensors

* Adding price descriptor sensor

* Use correct number of sensors in spike sensor tests

* Add tests for normalize_descriptor

* Removing debug message

* Removing price_descriptor attribute from the current sensor

* Refactoring everything to use the new API

* Use SiteStatus object, fix some typnig issues

* fixing test

* Adding predicted price to attributes

* Fix advanced price in forecast

* Testing advanced forecasts

* WIP: Adding advanced forecast sensor. need to add attributes, and tests

* Add advanced price attributes

* Adding forecasts to the advanced price sensor

* Appending forecasts corectly

* Appending forecasts correctly. Again

* Removing sensor for the moment. Will do in another PR

* Fix failing test that had the wrong sign

* Adding test to improve coverage on config_flow test

* Bumping amberelectric dependency to version 2

* Remove advanced code from helpers

* Use f-strings

* Bumping to version 2.0.1

* Bumping amberelectric to version 2.0.2

* Bumping amberelectric to version 2.0.2

* Bumping verion amberelectric.py to 2.0.3. Using correct enums

* Bumping amberelectric.py version to 2.0.4

* Bump version to 2.0.5

* Fix formatting

* fixing mocks to include interval_length

* Bumping to 2.0.6

* Bumping to 2.0.7

* Bumping to 2.0.8

* Bumping to 2.0.9

* Bumping version 2.0.12
2024-11-20 11:27:24 +01:00
Xidorn Quan 2bc7904b51
Add demand window sensor for amberelectric (#121356) 2024-07-06 12:28:52 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet 7dfaa05793
Improve type hints in amberelectric tests (#119229) 2024-06-09 22:04:40 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
Joost Lekkerkerker 9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Myles Eftos 41a256a3ff
Show site state in Amberelectric config flow (#104702) 2024-02-05 10:53:42 +01:00
Scott Giminiani f4ad261f51
Use global CONF_API_TOKEN constant rather than defining our own (#96120) 2023-07-08 10:46:34 +02:00
epenet b61ad43144
Add missing mock in amber config flow tests (#89358) 2023-03-08 10:17:45 -05:00
epenet c5a56dab42
Apply hass-relative-import to tests (a-c) (#78728) 2022-09-19 09:48:25 +02:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Myles Eftos 38d8332e92
Add amberelectric price descriptors (#67981)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-17 10:15:47 +01:00
Marc Mueller d057850971
Update typing - collections.abc (3) (#63947) 2022-01-12 08:04:17 +01:00
Marc Mueller ef7316d8d9
Update typing (5) [tests] (#63926) 2022-01-11 21:28:13 +01:00
Matt Zimmerman ae3ff0a8ce
Skip empty test directories in gen_requirements_all (#62970) 2022-01-07 16:45:27 +01:00
Simone Chemelli 8a02d87a17
Removed deprecated "device_state_attributes" for Amberelectric (#59672)
* Removed deprecated "device_state_attributes"

* Cleanup

* Postpone removal

* log deprecation warning

* Update homeassistant/helpers/entity.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-16 16:11:46 +01:00
Lawrence 205b40cf16
Updated amberelectic attributes to reflect unit change to $/kWh (#57109) 2021-10-05 20:34:23 -07:00
Myles Eftos 8e91e6e97e
Adding price spike binary sensor to the Amber electric integration (#56736) 2021-09-28 18:01:35 -07:00
Myles Eftos 412ecacca3
Amberelectric (#56448)
* Add Amber Electric integration

* Linting

* Fixing some type hinting

* Adding docstrings

* Removing files that shouldn't have been changed

* Splitting out test helpers

* Testing the price sensor

* Testing Controlled load and feed in channels

* Refactoring mocks

* switching state for native_value and unit_of_measurement for native_unit_of_measurement

* Fixing docstrings

* Fixing requiremennts_all.txt

* isort fixes

* Fixing pylint errors

* Omitting __init__.py from test coverage

* Add missing config_flow tests

* Adding more sensor tests

* Applying suggested changes to __init.py__

* Refactor coordinator to return the data object with all of the relevent data already setup

* Another coordinator refactor - Better use the dictionary for when we build the sensors

* Removing first function

* Refactoring sensor files to use entity descriptions, remove factory

* Rounding renewable percentage, return icons correctly

* Cleaning up translation strings

* Fixing relative path, removing TODO

* Coordintator tests now accept new (more accurate) fixtures

* Using a description placeholder

* Putting missing translations strings back in

* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site

* Removing DEVICE_CLASS, replacing the units with AUD/kWh

* Settings _attr_unique_id

* Removing icon function (it's already the default)

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Adding strings.json

* Tighter wrapping for try/except

* Generating translations

* Removing update_method - not needed as it's being overriden

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Fixing tests

* Add missing description placeholder

* Fix warning

* changing name from update to update_data to match async_update_data

* renaming [async_]update_data => [async_]update_price_data to avoid confusion

* Creating too man renewable sensors

* Override update method

* Coordinator tests use _async_update_data

* Using $/kWh as the units

* Using isinstance instead of __class__ test. Removing a zero len check

* Asserting self._sites in second step

* Linting

* Remove useless tests

Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-28 00:03:51 -07:00