mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 06:46:58 +00:00
withings update template sensor example (#19968)
This commit is contained in:
parent
0e530d3997
commit
5c0ed1d24a
@ -127,46 +127,52 @@ In a text editor, replace ```USER_PROFILE_NAME``` in the template sensors below
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
sensor:
|
template:
|
||||||
- platform: template
|
- sensor:
|
||||||
sensors:
|
- name: Withings weight lbs USER_PROFILE_NAME
|
||||||
withings_weight_lbs_USER_PROFILE_NAME:
|
|
||||||
friendly_name: "withings weight_lbs_USER_PROFILE_NAME"
|
|
||||||
unit_of_measurement: "lbs"
|
unit_of_measurement: "lbs"
|
||||||
value_template: "{{ (states('sensor.withings_weight_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185) | round(2, default=0) }}"
|
state: >-
|
||||||
icon_template: mdi:weight-pound
|
{{
|
||||||
|
(states('sensor.withings_weight_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185)
|
||||||
|
| round(2, default=0)
|
||||||
|
}}
|
||||||
|
icon: "mdi:weight-pound"
|
||||||
|
|
||||||
- platform: template
|
- name: Withings bone mass lbs USER_PROFILE_NAME
|
||||||
sensors:
|
|
||||||
withings_bone_mass_lbs_USER_PROFILE_NAME:
|
|
||||||
friendly_name: "withings bone_mass_lbs_USER_PROFILE_NAME"
|
|
||||||
unit_of_measurement: "lbs"
|
unit_of_measurement: "lbs"
|
||||||
value_template: "{{ (states('sensor.withings_bone_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185) | round(2, default=0) }}"
|
state: >-
|
||||||
icon_template: mdi:weight-pound
|
{{
|
||||||
|
(states('sensor.withings_bone_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185)
|
||||||
|
| round(2, default=0)
|
||||||
|
}}
|
||||||
|
icon: "mdi:weight-pound"
|
||||||
|
|
||||||
- platform: template
|
- name: Withings fat free mass lbs USER_PROFILE_NAME
|
||||||
sensors:
|
|
||||||
withings_fat_free_mass_lbs_USER_PROFILE_NAME:
|
|
||||||
friendly_name: "withings fat_free_mass_lbs_USER_PROFILE_NAME"
|
|
||||||
unit_of_measurement: "lbs"
|
unit_of_measurement: "lbs"
|
||||||
value_template: "{{ (states('sensor.withings_fat_free_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185) | round(2, default=0) }}"
|
state: >-
|
||||||
icon_template: mdi:weight-pound
|
{{
|
||||||
|
(states('sensor.withings_fat_free_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185)
|
||||||
|
| round(2, default=0)
|
||||||
|
}}
|
||||||
|
icon: "mdi:weight-pound"
|
||||||
|
|
||||||
- platform: template
|
- name: Withings fat mass lbs USER_PROFILE_NAME
|
||||||
sensors:
|
|
||||||
withings_fat_mass_lbs_USER_PROFILE_NAME:
|
|
||||||
friendly_name: "withings fat_mass_lbs_USER_PROFILE_NAME"
|
|
||||||
unit_of_measurement: "lbs"
|
unit_of_measurement: "lbs"
|
||||||
value_template: "{{ (states('sensor.withings_fat_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185) | round(2, default=0) }}"
|
state: >-
|
||||||
icon_template: mdi:weight-pound
|
{{
|
||||||
|
(states('sensor.withings_fat_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185)
|
||||||
|
| round(2, default=0)
|
||||||
|
}}
|
||||||
|
icon: "mdi:weight-pound"
|
||||||
|
|
||||||
- platform: template
|
- name: Withings muscle mass lbs USER_PROFILE_NAME
|
||||||
sensors:
|
|
||||||
withings_muscle_mass_lbs_USER_PROFILE_NAME:
|
|
||||||
friendly_name: "withings muscle_mass_lbs_USER_PROFILE_NAME"
|
|
||||||
unit_of_measurement: "lbs"
|
unit_of_measurement: "lbs"
|
||||||
value_template: "{{ (states('sensor.withings_muscle_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185) | round(2, default=0) }}"
|
state: >-
|
||||||
icon_template: mdi:weight-pound
|
{{
|
||||||
|
(states('sensor.withings_muscle_mass_kg_USER_PROFILE_NAME') | float(0) * 2.20462262185)
|
||||||
|
| round(2, default=0)
|
||||||
|
}}
|
||||||
|
icon: "mdi:weight-pound"
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user