Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - platform: template
- sensors:
- antalrodvin:
- friendly_name: Antal rødvin
- icon_template: mdi:bottle-wine
- value_template: >-
- {% set ns = namespace(count=0) %}
- {% for state in states.sensor if 'cellar_tracker_type' in state.entity_id and 'red' in state.entity_id and not 'sparkling' in state.entity_id and not 'fortified' in state.entity_id and not 'dessert' in state.entity_id %}
- {% set ns.count = ns.count + state.state|int %}
- {% endfor %}
- {{ ns.count }}
- - platform: template
- sensors:
- antalhvidvin:
- friendly_name: Antal hvidvin
- icon_template: mdi:bottle-wine
- value_template: >-
- {% set ns = namespace(count=0) %}
- {% for state in states.sensor if 'cellar_tracker_type' in state.entity_id and 'white' in state.entity_id and not 'sparkling' in state.entity_id and not 'fortified' in state.entity_id and not 'dessert' in state.entity_id %}
- {% set ns.count = ns.count + state.state|int %}
- {% endfor %}
- {{ ns.count }}
- - platform: template
- sensors:
- antalrosevin:
- friendly_name: Antal rosévin
- icon_template: mdi:bottle-wine
- value_template: >-
- {% set ns = namespace(count=0) %}
- {% for state in states.sensor if 'cellar_tracker_type' in state.entity_id and 'ros' in state.entity_id and not 'sparkling' in state.entity_id and not 'fortified' in state.entity_id and not 'dessert' in state.entity_id %}
- {% set ns.count = ns.count + state.state|int %}
- {% endfor %}
- {{ ns.count }}
- - platform: template
- sensors:
- antalmousserende:
- friendly_name: Antal mousserende vine
- icon_template: mdi:bottle-wine
- value_template: >-
- {% set ns = namespace(count=0) %}
- {% for state in states.sensor if 'cellar_tracker_type' in state.entity_id and 'sparkling' in state.entity_id %}
- {% set ns.count = ns.count + state.state|int %}
- {% endfor %}
- {{ ns.count }}
- - platform: template
- sensors:
- antaldessert:
- friendly_name: Antal dessertvine
- icon_template: mdi:bottle-wine
- value_template: >-
- {% set ns = namespace(count=0) %}
- {% for state in states.sensor if 'cellar_tracker_type' in state.entity_id and ('fortified' in state.entity_id or 'dessert' in state.entity_id) %}
- {% set ns.count = ns.count + state.state|int %}
- {% endfor %}
- {{ ns.count }}
- - platform: template
- sensors:
- antalandre:
- friendly_name: Antal andre
- icon_template: mdi:bottle-wine
- value_template: >-
- {% set ns = namespace(count=0) %}
- {% for state in states.sensor if 'cellar_tracker_type' in state.entity_id and not 'white' in state.entity_id and not 'ros' in state.entity_id and not 'red' in state.entity_id and not 'sparkling' in state.entity_id and not 'fortified' in state.entity_id and not 'dessert' in state.entity_id %}
- {% set ns.count = ns.count + state.state|int %}
- {% endfor %}
- {{ ns.count }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement