The last_seen attribute was a datetime in the local timezone but with
no tzinfo (i.e., a "naive" datetime.) When state changes occurred it
would be printed incorrectly in homeassistant.log because
homeassistant.util.dt.as_local assumes any datetime without tzinfo is
UTC. Also most, if not all, datetime attributes are timezone aware in
UTC. So use homeassistant.util.dt.as_utc (which assumes a naive
datetime is local) to convert last_seen to a timezone aware datetime
in UTC.
A recent change caused an issue if a single static wemo device is offline and could not be reached, then the whole component would not initialize (and therefore all other wemo devices are not added).
A recent change caused an issue if a single static wemo device is offline and could not be reached, then the whole component would not initialize (and therefore all other wemo devices are not added).
* initial working version of a geo location component and georss platform
* ensure that custom attributes don't override built-in ones
* bugfixes and tests
* fixing tests because of introduction of new component using same fixture
* improving test cases
* removing potentially unavailable attribute from debug message output
* completing test suite
* cleaning up debug messages; sorting entries in group view by distance
* ability to define the desired state attribute and corresponding unit of measurement; sort devices in group by configured state; find centroid for map if event is defined by polygon; updated tests
* sort entries in group; code clean-ups
* fixing indentation
* added requirements of new component and platform
* fixed various lint issues
* fixed more lint issues
* introducing demo geo location platform; refactored geo location component and geo rss platform to fit
* removing geo rss events platform; added unit tests for geo location platform and demo platform
* reverting change in debug message for feedreader to avoid confusion with new geo location component
* updated requirements after removing georss platform
* removed unused imports
* fixing a lint issue and a test case
* simplifying component code; moving code into demo platform; fixing tests
* removed grouping from demo platform; small refactorings
* automating the entity id generation (the use of an entity namespace achieves the same thing)
* undoing changes made for the georss platform
* simplified test cases
* small tweaks to test case
* rounding all state attribute values
* fixing lint; removing distance from state attributes
* fixed test
* renamed add_devices to add_entities; tweaked test to gain more control over the timed update in the demo platform
* reusing utcnow variable instead of patched method
* fixed test by avoiding to make assumptions about order of list of entity ids
* adding test for the geo location event class
* Added support for Habitica
Second refactoring
Moved all config to component.
Sensors are autodiscovered.
Signed-off-by: delphi <cpp.create@gmail.com>
* Apply requested changes
Signed-off-by: delphi <cpp.create@gmail.com>
* Made event fire async. Made `sensors` config implicit and opt-out-style.
Signed-off-by: delphi <cpp.create@gmail.com>
* Removed unneeded check and await.
Signed-off-by: delphi <cpp.create@gmail.com>
* Moved into separate component package and added service.yaml
Signed-off-by: delphi <cpp.create@gmail.com>
* Fix coveralls
Signed-off-by: delphi <cpp.create@gmail.com>