Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- globals:
- # ============================================================================= #
- # Store Finish Time.
- - id: time1_finish
- type: int
- restore_value: no
- initial_value: "0"
- sensor:
- - platform: template
- name: test time 1 finish
- id: test_time_1_finish
- lambda: "return id(time1_finish);"
- accuracy_decimals: 0
- unit_of_measurement: minutes
- icon: mdi:timer-outline
- # Update the countdown timers every 5 seconds.
- interval:
- - interval: 5s
- then:
- - lambda: |-
- time1_finish = id(homeassistant_time).now();
- - sensor.template.publish:
- id: test_time_1_finish
- state: !lambda return id(time1_finish);
- # - lambda: |-
- # if (id(remaining_time1) > 0) {
- # // Store the previous time.
- # id(remaining_time1) = id(time1_finish) - id(homeassistant_time).now();
- # }
- time:
- - platform: homeassistant
- id: homeassistant_time
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement