Skip to content

Rain Card Pro ​

Deprecated

The rain card is deprecated: it still works in 3.0 and goes in 4.0. Use a poster or a tile of the rain kind; Moving to 3.0 says what changes.

custom:rain-card-pro shows how hard it rains now and, with a second sensor, how much fell today. It animates the rain in three styles: drops fall, more and faster the harder it rains and slanted by the wind; ripples spread on a puddle; fill is a rain gauge whose water rises with today's total. Your rules colour the rain. Without options it is a tile; visual: flow makes the whole tile the field, layout: hero adds the big value and a band. YAML only.

Tile ​

The rate sensor alone makes a tile: the name, the rate and, with today, the total so far. The round lead shows a small version of the animation, or the rain icon on a dry day.

Flow tile ​

visual: flow turns the tile into the animated field with the rain icon and the texts on top. A wide tile shows the name, the rule label with today's total and the big rate; a narrow one the name and "rate · total today". flow.style picks the animation.

Hero ​

layout: hero shows the big rate with the label and today's total, then the band with a chip that repeats the total. flow.height sets the band's height (40 to 400 px, default 120); given more height, the band fills the card (Filling the height). title, icon and header_entities add a header. The gauge (fill) is full at 12 mm.

Wind and direction ​

wind slants the drops with the wind speed (up to 32° from about 35 km/h; m/s, mph, kn and ft/s are understood) and direction says which way: a westerly wind blows them to the right. Without wind the drops fall straight; without direction they lean to the right. Ripples and the gauge ignore the wind.

Rules and colours ​

rules work on the rate like the entity rules: below / above in the sensor's unit, first match wins. The rule's color paints the rain, the lead and the chip's icon; its label is the tile's pill and the accent of the second line; tint_card: true tints the whole card. A fixed color overrides the rules. Below 0.1 mm/h it counts as dry: no drops, the icon in the lead. Rates in in/h, mm/d or in/d and totals in in or cm are understood; the texts stay in the sensor's unit.

Lead and motion ​

lead: icon puts the rain icon in the round lead instead of the animation (a flow tile always shows the icon). The animation keeps flowing through sensor updates and pauses, leaving a still field, when your system asks for reduced motion.

Hover ​

hover: true shows what a click will do, as Home Assistant's tile does: a light layer over the tile under the pointer, a stronger one while pressed; header entities do too, a hero keeps still. See Hover.

Reference ​

Card options ​

OptionDefaultDescription
entityrequiredThe rain rate sensor (sensor.*, mm/h or in/h).
today–Today's total (mm or in): shown as "… today", fills the gauge, appears in the hero's chip.
wind, direction–Wind speed and direction sensors: slant the drops. Direction in degrees or an English compass point (N, NNE …).
name, secondaryfriendly name / see aboveThe first line and the line under it; templates allowed. secondary replaces the generated line.
color–Fixed colour; overrides the rules.
decimalssensorDecimals of the rate.
rules–[{ below, above, color, label, tint_card }] on the rate; first match wins.
layouttiletile or hero.
visualiconTile: flow makes the whole tile the animated field.
leadanimatedThe round lead: animated (the style, small) or icon.
icon_stylecircleplain draws the icon lead (lead: icon) without its circle; the animated lead keeps it.
flowsee belowThe animation options.
title, icon–Header, templates allowed. header_entities as in the group card.
title_tap_actionnoneAction when the title or its icon is tapped, e.g. { action: navigate, navigation_path: /dashboard-rooms/kitchen } to open the room's dashboard; see Actions.
tap_action …more-info / more-info / nonetap_action, hold_action, double_tap_action on the lead row.
hoverfalseHome Assistant's hover and press layers on the tile; see Hover.

Flow options ​

OptionDefaultDescription
styledropsdrops, ripples or fill. The rate sets how much rain each shows; there is no density.
height120Height of the hero's band in px (40 to 400). The flow tile's band fills the tile.

The tile takes 6 columns, the hero 12; both size to their content (a tile at least one row, two with a header). The card shows the current states only.

Released under the MIT License.