1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Code styling tweaks to the tests - Part 1 (#86192)

This commit is contained in:
Franck Nijhof
2023-01-20 13:52:46 +01:00
committed by GitHub
parent 79b52a2b41
commit 24fdd588fd
50 changed files with 552 additions and 251 deletions

View File

@@ -93,7 +93,9 @@ async def test_state_value(hass: HomeAssistant) -> None:
"command_on": f"echo 1 > {path}",
"command_off": f"echo 0 > {path}",
"value_template": '{{ value=="1" }}',
"icon_template": '{% if value=="1" %} mdi:on {% else %} mdi:off {% endif %}',
"icon_template": (
'{% if value=="1" %} mdi:on {% else %} mdi:off {% endif %}'
),
}
},
)
@@ -142,7 +144,10 @@ async def test_state_json_value(hass: HomeAssistant) -> None:
"command_on": f"echo '{oncmd}' > {path}",
"command_off": f"echo '{offcmd}' > {path}",
"value_template": '{{ value_json.status=="ok" }}',
"icon_template": '{% if value_json.status=="ok" %} mdi:on {% else %} mdi:off {% endif %}',
"icon_template": (
'{% if value_json.status=="ok" %} mdi:on'
"{% else %} mdi:off {% endif %}"
),
}
},
)