Skip to content

Instantly share code, notes, and snippets.

@pgasidlo
Last active February 8, 2022 19:22
Show Gist options
  • Select an option

  • Save pgasidlo/af67351828c49ca31dcebb6fbcf791d7 to your computer and use it in GitHub Desktop.

Select an option

Save pgasidlo/af67351828c49ca31dcebb6fbcf791d7 to your computer and use it in GitHub Desktop.
blueprint:
name: Gas Meter
description: Gas Meter
domain: automation
input:
base:
name: Base
saved:
name: Saved
delta:
name: Delta
variables:
base: !input base
saved: !input saved
delta: !input delta
trigger:
- platform: time_pattern
minutes: "/10"
action:
- service: input_number.set_value
data_template:
entity_id: "{{ saved }}"
value: "{{ states(base)|float + states(delta)|float }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment