Skip to content

State updated helper - Monitor changes to the state 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

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

State updated helper

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

The state updated helper integration allows you to create a binary sensors 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 the user defined time period has expired.

For installation instructions until the State updated helper is part of HACS, see this guide.

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 are 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

Services

Available services: reset and reset_all.

Service state_updated.reset

Reset a specific State Updated entity.

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

Service 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 a content about what has changed.