Commit Graph

43 Commits (3488b7836521f9d5963b77cff5614cec9f92968c)

Author SHA1 Message Date
Erik Montnemery ae8652217c
Change utility_meter last_reset timestamps to UTC (#51067) 2021-05-25 15:46:54 +02:00
Erik Montnemery 0c40f37336
Set device_class and state_class for utility_meter (#50921)
* Set device_class and state_class for utility_meter

* Update test

* Tweak tests according to review comments
2021-05-21 13:23:20 +02:00
Franck Nijhof eccefd154a
Extend targets for entity component services (#50760) 2021-05-17 14:06:50 +02:00
Erik Montnemery ee4e14e45e
Hoist ATTR_LAST_RESET from utility_meter to SensorEntity (#50757) 2021-05-17 13:51:09 +02:00
tkdrob 5d6f4068d3
Add targets and selectors for services (U-W) (#50630)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-15 10:49:10 +02:00
Franck Nijhof 2ed386f9e6
Migrate to async_get_current_platform everywhere (#50034) 2021-05-03 09:34:28 -07:00
Diogo Gomes 24b9d73392
Improves UX of Utility Meter services (#48556) 2021-05-02 10:53:35 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery 783b453bbe
Migrate integrations t-v to extend SensorEntity (#48216) 2021-03-22 19:47:44 +01:00
Erik Montnemery 346a724ac3
Mark base components' state_attribute @final, rename others to extra_state_attributes (#48161)
* Mark base state_attributes @final, rename others to extra_state_attributes

* Fix calendar, update tests
2021-03-21 10:38:24 +01:00
Erik Montnemery 1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
Diogo Gomes 81c77942eb
Update the Utility Meter sensor status on HA start (#44765)
* fix status on HA start

* better coverage and fix

* fix test

* address review
2021-01-13 16:42:28 +01:00
Diogo Gomes b290a8b5a1
always sync unit_of_measurement (#44670) 2020-12-31 00:39:14 +01:00
Thomas Delaet 293f8eaaf3
Add quarter-hour period feature for utility_meter component (#41999)
* add support for quarter-hourly intervals to utility meter (15 minutes)

* add tests

* add test for every quarter

* Update homeassistant/components/utility_meter/sensor.py

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-11-14 11:53:59 +01:00
Diogo Gomes 12adde5349
On HA restart parse last_reset as a datetime object (#42939) 2020-11-09 08:35:50 +01:00
Hareesh M U c8d5500441
Add bimonthly period feature for utility_meter component (#39931) 2020-09-15 17:52:19 +02:00
J. Nick Koston aed98a830f
Switch async_track_state_change to the faster async_track_state_change_event part 5 (#37866)
Calling async_track_state_change_event directly is faster than async_track_state_change (see #37251) since async_track_state_change is a wrapper around async_track_state_change_event now
2020-07-14 22:25:12 -07:00
Diogo Gomes 53c1aba7df
Fix utility_meter calibration with float values (#35186) 2020-05-05 02:44:00 +02:00
Franck Nijhof 24840b54ac
Add yamllint (in pre-commit and CI) (#33676)
* Add yamllint (in pre-commit and CI)

* Fix linting for all YAML files

* Bump and add it to requirements

* Fix gen_requirements for pre-commit, remove 'v' from version
2020-04-05 10:33:45 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Paulus Schoutsen aef06a3544
Directly call write state 2 (#33513)
* Directly call async_write_ha_state pt2

* Directly call async_write_ha_state pt2

* Fix mock

* Address comments
2020-04-03 09:34:50 +02:00
Paulus Schoutsen aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
Diogo Gomes 16336bf902
Add entity_service calibrate_meter to utility_meter (#32658)
* add calibrate service
2020-03-11 09:42:22 +01:00
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Franck Nijhof bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +01:00
Franck Nijhof b4d6d238e5 Correct names in manifests (T-Z) (#30546) 2020-01-07 14:31:18 +01:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Bas Nijholt e4e4f78eb0 Sort imports according to PEP8 for utility_meter (#29710) 2019-12-09 11:54:56 +01:00
Andrew McRae de0db1601b Add quarterly cycle for utility_meter component (#29534)
* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.

* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.

* Change date for test for utility_meter

* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.
2019-12-08 09:49:18 +01:00
Paulus Schoutsen 02d9ed5e36
Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
2019-12-02 16:23:12 -08:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Franck Nijhof 9035efee10 Fixes invalid JSON files and whitespace corrections in YAML files (#26396) 2019-09-03 16:02:42 -07:00
Franck Nijhof decf13b948 Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Aaron Bach 2fb03106ea
Add area support to utility meter service schemas (#25442)
* Add area support to utility meter service schemas

* Reverted mistaken deletion
2019-07-23 16:43:48 -06:00
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Diogo Gomes 7c5846aed2 Fix #22648 - Utility_meter would try to cancel a non existing task (#22669)
* don't cancel tariff that are paused

* test tariffs
2019-04-03 08:49:53 +02:00
Diogo Gomes 8e9a496002 Utility Meter offset defined by a time_period (#20926)
* change offset from int to Time period dictionary

* track according to offset

* left overs... tks @fabaff

* typo
2019-03-06 07:55:24 -05:00
Justin Bassett 02745be44d Allows the utility_meter to net meter rather than only allow increases. (#21204)
* Allow the utility_meter to net meter rather than only allow increases.

* Fix PR issues around CI.

* Fix line length fallout.

* Change rollover to net_consumption.  Add unit tests.

* Fix test style issues.

* Fix style in tests.
2019-02-23 14:02:39 +00:00
Diogo Gomes 3b5ed7a20f Fix track_change error in utility_meter (#21134)
* split validation

* remove any()
2019-02-17 20:40:51 -08:00
Diogo Gomes 9cab597bc4 Don't expose services in Utility_Meter unless tariffs are available (#20878)
* only expose services when tariffs configured

* don't register services multiple times
2019-02-16 20:04:56 -08:00
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
Diogo Gomes 1d5ffe9ad5 Utility meter (#19718)
* initial commit

* test service calls

* lint

* float -> Decimal

* extra tests

* lint

* lint

* lint

* lint

* fix self reset

* clean

* add services

* improve service example description

* add optional paused initialization

* fix

* travis fix

* fix YEARLY

* add tests for previous bug

* address comments and suggestions from @ottowinter

* lint

* remove debug

* add discoverability capabilities

* no need for _hass

* Update homeassistant/components/sensor/utility_meter.py

Co-Authored-By: dgomes <diogogomes@gmail.com>

* Update homeassistant/components/sensor/utility_meter.py

Co-Authored-By: dgomes <diogogomes@gmail.com>

* correct comment

* improve error handling

* address @MartinHjelmare comments

* address @MartinHjelmare comments

* one patch is enought

* follow @ballob suggestion in https://github.com/home-assistant/architecture/issues/131

* fix tests

* review fixes

* major refactor

* lint

* lint

* address comments by @MartinHjelmare

* rename variable
2019-01-26 16:33:11 +01:00