Flexible Horseshoe Card input number¶
An Flexible Horseshoe Card input number adds an adjustable numeric setting directly to a Flexible Horseshoe Card. Use it for a history duration, scale boundary, threshold, offset, width, or any other number used by the card.
The value is stored in the current browser and does not require a Home Assistant helper. Use a Home Assistant Input number instead when automations, other dashboards, or other devices need the same value.
Basic configuration¶
Add the input to the card's entities list. Its entity ID must start with fhs_input_number..
Connect a number control to the input:
Use a slider control instead when the user should adjust the value by dragging along a range.
Configuration options¶
| Option | Description |
|---|---|
entity | A unique entity ID starting with fhs_input_number.. |
initial | Value assigned when the input is created. |
min | Lowest value the input can contain. |
max | Highest value the input can contain. |
step | Amount added or removed by each adjustment. |
unit | Unit shown with the value. |
decimals | Number of decimal places shown for the value. |
scope: card | Keeps a separate value for this card. |
scope: global | Shares the value with Flexible Horseshoe Card cards in the current browser. |
persist: true | Restores a global value after the browser reloads. |
name | Name shown by tools that display the entity name. |
icon | Icon shown by tools that display the entity icon. |
See Entities for slots and other entity settings.
Use the value in a card¶
The input state contains the current value. Convert it to a number when using it in a calculation.
This example converts a number of days to the hours used by a sparkline history period:
The same pattern can change a scale, threshold, size, position, or other numeric card setting.
List of actions¶
Number and slider controls change the value directly. Buttons and other actionable tools can use these actions:
| Action | Result |
|---|---|
fhs_input_number.set_value | Sets the input to a specific value. |
fhs_input_number.increment | Adds one configured step. |
fhs_input_number.decrement | Removes one configured step. |
The value remains within the configured min and max.
Keep the value after reloading¶
Use scope: global with persist: true when the number should remain active after reloading the dashboard:
Every Flexible Horseshoe Card card in the current browser that defines fhs_input_number.history_days receives the same value. Other browsers and devices keep their own value.