home assistant iframe black munin graph
· 1012 B · Text
Неформатований
entity: sensor.time
content: |2-
<a href="https://mun.echosystem.fr/home.lan/Bmax.home.lan/">
<img id="img1" src="https://mun.echosystem.fr/home.lan/Bmax.home.lan/speedfan-day.png">
<img id="img2" src="https://mun.echosystem.fr/home.lan/Bmax.home.lan/processor-day.png">
</a>
<script>
function refreshImages() {
const timestamp = new Date().getTime(); // Obtenir l'heure actuelle pour éviter le cache
document.getElementById('img1').src = `https://mun.echosystem.fr/home.lan/Bmax.home.lan/speedfan-day.png?timestamp=${timestamp}`;
document.getElementById('img2').src = `https://mun.echosystem.fr/home.lan/Bmax.home.lan/processor-day.png?timestamp=${timestamp}`;
}
// Rafraîchir les images toutes les 5 minutes (300000 millisecondes)
setInterval(refreshImages, 300000);
</script>
<style>
img {
-webkit-filter: invert(100%);
filter: invert(100%);
}
</style>
type: custom:tailwindcss-template-card
| 1 | entity: sensor.time |
| 2 | content: |2- |
| 3 | <a href="https://mun.echosystem.fr/home.lan/Bmax.home.lan/"> |
| 4 | <img id="img1" src="https://mun.echosystem.fr/home.lan/Bmax.home.lan/speedfan-day.png"> |
| 5 | <img id="img2" src="https://mun.echosystem.fr/home.lan/Bmax.home.lan/processor-day.png"> |
| 6 | </a> |
| 7 | <script> |
| 8 | function refreshImages() { |
| 9 | const timestamp = new Date().getTime(); // Obtenir l'heure actuelle pour éviter le cache |
| 10 | document.getElementById('img1').src = `https://mun.echosystem.fr/home.lan/Bmax.home.lan/speedfan-day.png?timestamp=${timestamp}`; |
| 11 | document.getElementById('img2').src = `https://mun.echosystem.fr/home.lan/Bmax.home.lan/processor-day.png?timestamp=${timestamp}`; |
| 12 | } |
| 13 | |
| 14 | // Rafraîchir les images toutes les 5 minutes (300000 millisecondes) |
| 15 | setInterval(refreshImages, 300000); |
| 16 | </script> |
| 17 | |
| 18 | <style> |
| 19 | img { |
| 20 | -webkit-filter: invert(100%); |
| 21 | filter: invert(100%); |
| 22 | } |
| 23 | </style> |
| 24 | type: custom:tailwindcss-template-card |
| 25 |