Recued
Menu
← Back to recipes

Record device conditions

by recued-core v2 57 views

Use “Record device conditions” in Recued. Checks the Home Assistant entity you linked, using fresh state, history and logbook reads. Confirmed problem and battery readings are recorded right away, and an outage only once it has lasted. Unexplained flicker stays conditional. Nothing is inferred about motion or occupancy.

How it works 48 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (48 steps)
◆ asset core.work-entity.get
Get work entity
■ now_iso date_add
Add 0 minutes to
■ now date_parse
Parse now iso as a date
■ hold_ms default
Apply default
■ flicker_window_ms default
Apply default
■ flicker_min_count default
Apply default
■ back_minutes math
Calculate: 0 - ({{step.flicker_window_ms}} + {{step.hold_ms}}) / 60000
■ start date_add
Add back minutes minutes to
◆ current_raw recued-core.home-assistant.state.read
Read state on home assistant
◆ history_raw recued-core.home-assistant.history.list
List history on home assistant
◆ logbook_raw recued-core.home-assistant.logbook.list
List logbook on home assistant
■ current default
Apply default
■ history flatten
Flatten nested lists in
■ history_at map
Extract last_changed from each item
■ entity_history filter
Filter by condition
■ latest_sample map
Extract from each item
■ samples flatten
Flatten nested lists in
■ hold held
Apply held
■ flicker transitions
Apply transitions
■ causes_at map
Extract when from each item
■ causes enrich_by
Apply enrich_by
■ changed_rows slice
Take a subset of
■ uncommanded filter
Filter by condition
■ uncommanded_count count
Count items in uncommanded
■ change_count count
Count items in changed rows
■ intended all
Check if all conditions are true
■ ignore_flicker any
Check if any of the conditions are true
■ settled compare
Check if hold status equals settled
■ unavailable compare
Check if current state equals unavailable
■ current_known compare
Check if current state is not one of unknown, ,
■ can_write_hold all
Check if all conditions are true
■ history_evidence json_stringify
Apply json_stringify
■ flicker_evidence json_stringify
Apply json_stringify
◆ unavailable_write core.work-entity.asset.observe
Observe work entity asset
skip: step.can_write_hold not_equal true
■ flicker_known all
Check if all conditions are true
■ flicker_active all
Check if all conditions are true
◆ flicker_write core.work-entity.asset.observe
Observe work entity asset
skip: step.flicker_known not_equal true
■ problem_type compare
Check if current attributes device class equals problem
■ problem_state_known compare
Check if current state is one of on, off
■ is_problem all
Check if all conditions are true
■ problem_active compare
Check if current state equals on
◆ problem_write core.work-entity.asset.observe
Observe work entity asset
skip: step.is_problem not_equal true
■ battery_type compare
Check if current attributes device class equals battery
■ battery_unit compare
Check if current attributes unit of measurement equals %
■ battery_value to_number
Convert current state to a number
■ battery_number compare
Check if battery value exists
■ battery_valid all
Check if all conditions are true
◆ battery_write core.work-entity.asset.observe
Observe work entity asset
skip: step.battery_valid not_equal true
▼
Output
json hold
json flicker
Settings 7 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

asset id setting = set at install
entity id setting = set at install
binding id setting = set at install
record battery setting = on
record problem setting = on
record flickering setting = on
record unavailable setting = on

Uses (5 operations)

Tasks & notes Get work entity core.work-entity.get
Pack operation Read state on home assistant recued-core.home-assistant.state.read
Pack operation List history on home assistant recued-core.home-assistant.history.list
Pack operation List logbook on home assistant recued-core.home-assistant.logbook.list
Tasks & notes Observe work entity asset core.work-entity.asset.observe

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

Permissions it requires

Read your Home_assistant connection
Declared by the recipe — Recued grants these at install, where you review them before approving.

What it's allowed to do

Read Tasks & notes core.work-entity.get read-only
Read Tasks & notes core.work-entity.asset.observe read-only

3 more aren't listed here. You'll see them at install.

Data it touches

SurfacesTasks & notes

About

Tags

home-assistant pack:home-assistantassetobservations

Details

48 steps 7 configurable settings recipe_id: record-device-condition-home-assistant