Skip to content

Monitor changes to the state/attribute of a entity

Notifications You must be signed in to change notification settings

kgn3400/state_updated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub release (latest by date) GitHub all releases GitHub last commit GitHub code size in bytes Validate% with hassfest

App icon

State updated helper


The state updated helper integration allows you to create a binary sensor which monitor another entity's __state__ or __state_attributes__ and reports when changed. It exposes the new and old value for the monitored entity, which can be used in the text template. The binary sensor will be cleared after a user defined time period has expired.

installation

For installation from HACS repository, click Open HACS Home Assistant Community Store.

State updated helper integration can be installed using HACS. Search for State updated in Integrations section.

Add a new State updated helper integration to your Home Assistant instance, click Open your Home Assistant instance and start setting up a new integration.

Configuration

Configuration is setup via UI in Home assistant. To add one, go to Settings > Devices & Services > Helpers and click the add button. Next choose the State updated helper option.

Config



Options



Field name Mandatory/Optional Description
Name Optional Name. If empty, entity id name is used
Entity id Mandatory Entity that this sensor tracks
Attribute Optional Attribute of entity that this sensor tracks
Icon Mandatory Icon used by entity
Clear updates after Mandatory User defined time period indicating when to clear the entity
Text template Optional Defines a template to create the text state attribute. Value = new_value, old_value, entity_id, attribute and last_updated

Exposed state attributes

The state updated helper integration provides the following state attributes.

Attribute Description
new_value New state/state_attribute value
old_value Old state/state_attribute value
text Text generated from template
last_updated Last time the state/state_attribute was updated

Actions

Available services: reset and reset_all.

Actions state_updated.reset

Reset a specific State Updated entity.

Service data attribute Optional Description
entity_id No Name of the State updated entity to reset.

Action state_updated.reset_all

Reset all State updated entities.

Usage scenario

Using the Scrape integration for retrieving latest software version. By letting the State updated helper monitor the Scrape entity, a card can be built that only shows when there are changes and an the content about what has changed.