Beta version 0.2.8b3 has now been published.
This includes new options to:
- include entity history in the feed, not just the current state
- disable scrollbars
- limit number of items in feed
- set maximum height of feed (CSS style)
- override default state display name (e.g. if you want ânot_homeâ to display as something like âUnknown Destinationâ rather than âAwayâ).
The additional options for entities are:
include_history (optional, defaults to false)
This allows the history of an entity to be displayed, rather than just its current state (states of âunknownâ are automatically filtered out). This currently uses the history for the last day.
max_history (optional)
The maximum history of the entity to display, this defaults to 3 In addition any attribute of the entity can be used (do not prefix with attributes. ).
remove_repeats (optional, defaults to true)
This controls whether to remove repeated states from the history (e.g. the current state is the same as the previous state). Since âunknownâ states are filtered out, this will avoid an entity appearing twice because it changed from âonâ to âunknownâ and back again following a restart. This can be disabled by setting this to false.
state_map (optional)
This allows custom mappings of states to display names, to override the device_class based mappings. In the example below this is used to map the ânot_homeâ state to âUnknown Destinationâ instead of the default âAwayâ.
Example:
type: 'custom:home-feed-card'
title: Home Feed
show_empty: false
id_filter: ^home_feed_.*
entities:
- entity: device_tracker.my_phone
name: Me
content_template: '{{display_name}} arrived at {{state}} ({{latitude}},{{longitude}})'
include_history: true
max_history: 5
remove_repeats: false
state_map:
not_home: Unknown Destination
The top level config also has the following three options:
scrollbars_enabled (optional, defaults to true)
This controls whether the feed is scrollable. If this is set to false then, by default, all items will be displayed unless the max_height or max_item_count option is used.
max_height (optional, defaults to 28em when scrollbars enabled, otherwise unlimited)
The maximum height of the feed in CSS format (e.g. â100pxâ, â20emâ, etc.). When scrollbars are disabled, the content will be cut off at this height, otherwise it will control the scrollable height.
max_item_count (optional, defaults to unlimited)
The maximum number of items to show in the feed, useful if scrollbars are disabled.
If you are using HACS and donât see the new version, check that you have enabled Beta versions (âShow Betaâ on the âhamburgerâ menu) and also try using the âReloadâ option to reload the data.
If you are not using HACS, you can download this release from here.