Allow to toggle living room light
This commit is contained in:
parent
48bb33e2bc
commit
aac937ad01
4 changed files with 492 additions and 7 deletions
|
|
@ -9,7 +9,22 @@
|
|||
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9"
|
||||
crossorigin="anonymous" />
|
||||
</head>
|
||||
<body>
|
||||
<body class="container">
|
||||
<h1>Home Assistant Invité</h1>
|
||||
<h2>Lumières</h2>
|
||||
<div class="list-group">
|
||||
{% for light in ["salon"] %}
|
||||
{% set st = status[light] %}
|
||||
{% if st
|
||||
== "on" %}
|
||||
{% set action = "off" %}
|
||||
{% else %}
|
||||
{% set action = "on" %}
|
||||
{% endif %}
|
||||
{% set act = "/" ~ action ~ "/" ~ light %}
|
||||
<a href="{{ act }}" class="list-group-item list-group-action">{{ light | capitalize }} ({{ st }})</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"
|
||||
crossorigin="anonymous"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue