Binary sensor from file

Hi all,
thanks for great project as HA.
But I need a help, I searched forum and examples for whole day and tried many configs but no success.
I’ve got a json file containing:

{"tariff":"low"} or {"tariff":"high"}
changed with current energy tariff.
In configuration.yaml I have:

sensor:
 - platform: file
   file_path: /run/tariff.json
   name: Energy tariff
   value_template: '{{ value_json.tariff }}'

and automations.yaml:

- alias: ventilation on
  trigger:
   - platform: template
     value_template: "{{ is_state('sensor.tariff', 'low') }}"
  action:
   - service: fan.turn_on
     entity_id:
      - fan.intake_fan
      - fan.exhaust_fan

- alias: ventilation off
  trigger:
   - platform: state
     entity_id: sensor.tariff
     to: 'high'
  action:
   - service: fan.turn_off
     entity_id:
      - fan.intake_fan
      - fan.exhaust_fan

I want to turn on and off, but it doesn’t work. As you can see I tried both state and template. I think the problem is that the sensor is not binary_sensor.
How to make binary_sensor from file or from sensor?
Thanks
Jiri

First off, does your file sensor actually change state from high to low and vice versa?

Look in the developer tools states menu to check.

I don’t think so. Are you sure your sensor is sensor.tariff?
Can you see it it Developer → States?
My bet is you can not as it’s something like sensor.energy_tariff

Yes, this is it. Am I stupid, I searched everywhere but not the name. Thanks