* Fix NMBS AttributeError (Issue #90505)
* Set and use API_FAILURE
* Configure the logger to track API failures
* Remove broad exceptions and rewite logging
* nmbs: Add canceled attribute
If a train is canceled, change the state to canceled and also add an attribute that can be matched.
Personnaly I look for the attribute and add a "line-through" CSS style to show my train was canceled.
I discovered this was not displayed the hard way :)
Signed-off-by: Tom Barbette <t.barbette@gmail.com>
* Update homeassistant/components/nmbs/sensor.py
canceled must be compared as an int, as suggested by @MartinHjelmare
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Collection of changing entity properties to class attributes
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add and use time related constants
* Sort time constants and reuse them in data rate constants
* Fix greeneyemonitor import
* Fix greeneyemonitor import V2
* Fix failing here_travel_time test
* Add TIME_MONTHS and TIME_YEARS
* Use TIME_MINUTES in opentherm_gw and isy994
* Add and use TIME_MILLISECONDS
* Change inconsistent ones
* Add TIME_MICROSECONDS and TIME_WEEKS
* Use constants in apcupsd and travisci
* Fix import error in upnp sensor.py
* Fix isy994 sensor.py using TIME_YEARS
* Fix dyson tests
* Use TIME_SECONDS in more places
* Use TIME_DAYS in google wifi
* Improve sensor for automations
I've updated the sensor so that departure time and delay can be used in automatons.
Before, the departure time and delay time were only available wrapped in strings which makes it difficult to use them in automations. Using the extra attributes, one can easily use them in automations.
* Update homeassistant/components/nmbs/sensor.py
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
* Updates based on review
Changed min to minutes as requested
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* Make name customizable for nmbs live sensors
* Change order of the live name
* Added unique id to live nmbs sensor
* Revert changing the name of the live sensor
* Consolidate
* Fix tests
* Update imports
* Fix import
* Use importlib because integration and package share name
* Fix more tests
* Update .coveragerc and CODEOWNERS