Set binary sensor inside of automation?

I might not understand how it works, but right now i have a automation and also binary sensors set up as below:

# Washing machine, dryer and dishwasher states
  - platform: template
    sensors:
      utility_room_washing_machine_1_current:
        friendly_name: "Utility Room Washing Machine Status"
        delay_on: "00:05:00"
        value_template: "{{ states('sensor.utility_room_washing_machine_1_current')|float > 6 }}"
        device_class: running
        
  - platform: template
    sensors:
      utility_room_dryer_1_current:
        friendly_name: "Utility Room Dryer Status"
        delay_on: "00:05:00"
        value_template: "{{ states('sensor.utility_room_dryer_1_current')|float > 6 }}"
        device_class: running
        
  - platform: template
    sensors:
      utility_room_dishwasher_1_current:
        friendly_name: "Kitchen Dishwasher Status"
        delay_on: "00:05:00"
        value_template: "{{ states('sensor.kitchen_dishwasher_1_current')|float > 6 }}"
        device_class: running

So i can use that sensor in a conditional card. But i wonder, why not set a sensor to true somewhere in the flow of automation? Wouldn’t that be easier and make more sense. Now it feels like i have to do this up 2 times.

Also getting this in my logs, so my template sensors are not completely correct it seems:

* Template warning: 'float' got invalid input 'unavailable' when rendering template '{{ states('sensor.utility_room_washing_machine_1_current')|float > 6 }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1

for your warning you need just to add (0) to float

float(0) 

for the rest; I’m not sure what you try to achieve

instead of a binary sensor you can use an input_boolean

No it would not. Automations are for automating. Sensor definitions are for defining sensors.

That still has to be defined in the correct place, not in the middle of an automation.

Why not? If i run an automation and i am at say point A, would it not make sense to declare i am at point A ?

That way i would not have to infer anything, i just know because i set the variable at the point when it happened.

For that: