Skip to content

Instantly share code, notes, and snippets.

@Didgeridrew
Created April 21, 2023 03:22
Show Gist options
  • Select an option

  • Save Didgeridrew/bba92d7f142a9ddd68abf81a3d2a4927 to your computer and use it in GitHub Desktop.

Select an option

Save Didgeridrew/bba92d7f142a9ddd68abf81a3d2a4927 to your computer and use it in GitHub Desktop.
HA - Trigger an automation every time a numeric entity's value hits a multiple i.e. 10, 20, 30, 40
alias: zTest Numeric State Mod trigger
description: ""
trigger:
- platform: numeric_state
entity_id: input_number.ztest_number
below: 1
value_template: "{{ state.state|int % 10 }}"
for: "00:00:05"
condition: null
action:
- service: persistent_notification.create
data:
message: "The number is low: {{ trigger.to_state.state }}"
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment