Apparently, this line:
valve: '{{ states(''input_number.sprinkler_valve_number'') | int }}'
does not return an int?
When I press the button, I get this error:
Failed to call service … expected int for dictionary value @ data[‘valve’]
Any hints would be appreciated.
Here is the button card configuration:
show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: esphome.sprinkler_controller_1_start_single_valve
service_data:
valve: '{{ states(''input_number.sprinkler_valve_number'') | int }}'
target: {}
name: Start valve