Home Assistant Community — Smart Home — Sat, 29 Aug 2026 10:06:00 +0000
Summary
A Home Assistant user asked how to use a dropdown (input_select) helper on a dashboard to change the value of a number entity, number.power-setpoint. The recommended approach is to use the number.set_value action with a template that converts the input_select's state to a float, but since most cards don't support templating in actions, the action should be placed in a script that accepts the target number entity and source entity as variables. An example script was provided with fields for the target number, source entity, and a default value, along with a sample Tile card configuration that calls the script and passes the required data. Alternatively, the responder suggested using a Template Select instead of an Input Select, which would directly link the select's value to updating the number entity and work with any card, script, or automation without needing to call a script.
Hi I have created a dropdown helper which I have on the dashboard which I would like to use to change the value of an entity. The entity is a number.power-setpoint. How would be the best way to do this ? Thanks
In general the way to set the state value of an Input Select to be as the value of a number entity is to use a template in the action like:
action: number.set_value
target:
entity_id: number.power-setpoint
data:
value: '{{ states("input_select.example")|float(0)}}'
But, almost no cards allow templating in the card action, so you would put the action in a script and the card action will call that script and provide the necessary data for the variables.
The script would be something like:
alias: Set a Number from another entity
fields:
target_n:
name: Target Number
selector:
entity:
multiple: false
filter:
- domain: number
source:
name: Source Entity
selector:
entity:
multiple: false
default_val:
name: Default Value
default: 0
required: false
selector:
number:
min: 0
max: 100
step: 0.1
sequence:
- action: number.set_value
target:
entity_id: "{{ target_n }}"
data:
value: '{{ states(source) | float( default_val or 0) }}'
The configuration for the card is going to vary based on the card type… a basic Tile card would be something like:
type: tile
entity: input_select.example
vertical: false
tap_action:
action: perform-action
perform_action: script.set_number_from_another_entity
target: {}
data:
source: input_select.example
target_n: number.power-setpoint
features_position: bottom
This could also be solved by using a Template Select instead of an Input Select. That way, changing the value of the Select would be directly linked to updating the number and it would work for any card, script, or automation without needing to call the script anytime you act on the Select.
If you’d like an example of how that would be done, let me know.
Original article: https://community.home-assistant.io/t/helper-dropdown-number-to-set-a-entity-value/1023049 Source: Home Assistant Community