So I’m trying to use a Helper so I can store the state of the number of portions I would like the Cat Feeder to feed my cat, I can manipulate the helper with a slider and it works perfectly, but when I try to use the helper variable into the Cat Feeder (Tuya Integration) it throws an error:
number/set_value. expected float for dictionary value @ data[‘value’]
I’ve read multiple posts that instructed me to use the | float conversion, but it still throws the same error.
This is the Code from my Lovelace UI Card:
- type: custom:mushroom-number-card
entity: input_number.cat_feed_portion
name: Define Portion
display_mode: buttons
icon_color: green
tap_action:
action: call-service
service: number.set_value
target:
device_id: number.cat_feeder
data:
value: '{{ states(''input_number.cat_feed_portion'') | float }}'
I know that using '{{ states(''input_number.cat_feed_portion'') | float }}'
on a blank card displays the portion I set/change on the slider, but I don’t see a decimal point on it.
Neither float / int works at the end of the sentence, but replacing the states as a whole by ‘4’ works and the cat feeder spins around.
Thanks in advance.