Last active
January 19, 2018 01:28
-
-
Save robotsandcake/54e2b3f1d1a9e2f9668ce7c170647706 to your computer and use it in GitHub Desktop.
This code will generate a customised customise.yaml file when put in the developer section of homeassistant
This file contains hidden or 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
| {% for state in states.sensor -%} | |
| {% if loop.first %} | |
| {% elif loop.last %} | |
| {% else %} | |
| {% endif %} | |
| {{- state.entity_id }}: | |
| friendly_name: '{{ state.attributes.friendly_name|replace("_"," ",)|title() if state.attributes.friendly_name is defined else state.name|replace("_"," ",)|title() }}' | |
| emulated_hue: {{state.attributes.emulated_hue if state.attributes.emulated_hue is defined else 'False' }} | |
| hidden: {{state.attributes.hidden if state.attributes.hidden is defined else "False"}} | |
| {{'icon: '+ state.attributes.icon if state.attributes.icon is defined}} | |
| {{'homebridge_cover_type: '+ state.attributes.homebridge_cover_type if state.attributes.homebridge_cover_type is defined}} | |
| {{'assumed_state: '+ state.attributes.assumed_state if state.attributes.assumed_state is defined}} | |
| {% endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment