Releases: pnbruckner/ha-composite-tracker
Use UTC datetimes internally
What's Changed
- Python datetime object comparisons and math don't work as expected when the objects are aware and have the same tzinfo attribute. Basically, the fold attribute is ignored in this case, which can lead to wrong results. Avoid this problem by using aware times in UTC internally. Only use local time zone for user visible attributes.
Full Changelog: 3.4.4...3.4.5
Add missing PACKAGE_MERGE_HINT to config.py
Fix new error w/ HA 2024.8
What's Changed
- Apparently, it's no longer allowed to call
async_get_hass
indirectly viaCONFIG_SCHEMA
, so move YAML config processing toconfig.py
. - Also, a couple other minor fixes/improvements.
Full Changelog: 3.4.2...3.4.3
Restore before checking input entities at startup
Originally input entities were checked at startup before possibly restoring state of the composite entity. This could cause an input entity with data older than the most recent data the composite used before shutdown to temporarily cause the composite to use that old data and abort the restore process. However, the restore process should happen first, so that input data older than the restored state can be properly reject. This release reverses those processes so that restoring happens first.
Import cached_property from functools instead of backports
What's Changed
- Import cached_property from functools instead of backports by @pnbruckner in #73
Full Changelog: 3.4.0...3.4.1
Accept various formats for last_seen/last_timestamp attribute
Enhance "last seen" attribute processing to allow a datetime string format. Basically, these attributes (last_seen or last_timestamp) can be any one of the following:
- a naive Python datetime object which is assumed to be in HA's configured time zone
- an aware Python datetime object in any time zone
- anything homeassistant.util.dt.utc_from_timestamp will accept (after being converted to a float)
- anything homeassistant.util.dt.parse_datetime will accept
Add option to specify entity picture
Previously it was possible to have a composite entity use the picture from one of its input entities. This release adds an option to use an image file instead, or for YAML configuration, an URL.
For an image file, it can either be one that is already on the system in the "/local" directory, which is actually <config_path>/www (typically /config/www.) Or, when using the UI to configure the composite entity, it is also possible to upload an image file (which will then be stored in "/local/uploaded".)
Fix bug in speed sensor when imported config is changed
Reloading the YAML configuration can cause an unhandled exception in the speed sensor. This fixes that bug.
Do not record entities & entity_picture attributes in database
Similar to the person component, do not record the entities
attribute in the database. Also, the value of the entity_picture
attribute is typically big and doesn't often change, so don't waste space in the database for it either.
Add optional driving state
Add configuration option for specifying a driving speed threshold. If specified, and the speed of the entity reaches or exceeds that threshold, and the entity is not in a zone, the state of the device_tracker entity will become driving
.