You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust the value_json.radar.past[-10:] to suit your needs. I left it at -10 even though I only animate 5 frames (for resource purposes.)
25
27
26
28
27
29
Next, you'll need two helpers:
28
30
29
31
First, one that is the frame number index that will be changed via an automation:
30
-
32
+
{% raw %}
33
+
```
31
34
input_number.rainviewer_frame_index
32
35
Minimum value: 0
33
36
Maximum value :10 <---- adjust for your needs, but it needs to be at least 1 more than configured in the automation
34
37
Step size: 1
35
38
Display Mode: Slider
36
-
37
-
39
+
```
40
+
{% endraw %}
38
41
Second, you'll need a template sensor
39
42
40
43
sensor.rainviewer_current_frame
41
-
```
44
+
{% raw %}
45
+
```jinja
42
46
{% set frames = states('sensor.rainviewer_frames').split(',') %}
43
-
{% set idx = states('input_number.rainviewer_frame_index')|int(0) %}
44
-
{{ frames[idx] if frames|length > idx else frames[-1] }}
47
+
{% set idx = states('input_number.rainviewer_frame_index')|int(0) %}
48
+
{{ frames[idx] if frames|length > idx else frames[-1] }}
45
49
```
46
-
50
+
{% endraw %}
47
51
Now, We need to create an automation to cycle the frames on the map:
48
52
49
-
```
53
+
{% raw %}
54
+
```yaml
50
55
alias: Cycle RainViewer Frames
51
56
triggers:
52
57
- seconds: /1# every 1 second. Adjust to your needs.
@@ -78,11 +83,11 @@ actions:
78
83
- sensor.rainviewer_current_frame
79
84
- input_number.rainviewer_frame_index
80
85
```
81
-
86
+
{% endraw %}
82
87
83
88
Lastly, the card itself. This is a stripped down anonymized version:
84
-
85
-
```
89
+
{% raw %}
90
+
```yaml
86
91
type: custom:map-card
87
92
focus_follow: none
88
93
theme_mode: light # Dark mode applies css filters to all layers and makes the rainmap layer look wrong.
@@ -116,7 +121,7 @@ card_mod: # This inverts ONLY the openstreetmap layer.
116
121
117
122
118
123
```
119
-
124
+
{% endraw %}
120
125
121
126
Many of the things I found I had mentioned in the notes.
122
127
@@ -127,27 +132,28 @@ Some of my lower end clients aren't super happy with the map with the animation
127
132
I'm running homeassistant OS as a VM on a healthily configured Dell R730XD running proxmox and I was still experiencing some lag on the map until I added the purge to the automation.
128
133
129
134
If you don't want or need animation, All you would need to overlay the latest radar images is the first rest sensor:
0 commit comments