Created
April 28, 2022 20:13
-
-
Save chadbaldwin/379423080faae3aefcb5fc7d807e1716 to your computer and use it in GitHub Desktop.
HomeAssistant Round template sensor example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# configuration.yaml | |
template: | |
- sensor: | |
- name: new_entity_id | |
device_class: power | |
unit_of_measurement: W # watts | |
state: "{{ states('sensor.target_entity_id') | default(0, true) | round(2, default=0) }}" | |
# customize.yaml | |
sensor.new_entity_id: | |
friendly_name: Friendly Name (Rounded) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[reserving first comment]