Help creating a rainy day trigger from Met Office data

Hi,

I’m struggling to work out how to create a rainy day trigger to turn on the lights, using data from the Met Office component / sensor. I’ve all ready got an input_boolean.rainy_day which toggles my lights, but I’d like to automate the toggle.

I was thinking something along the lines of the following (sorry it’s half code half comments)…

trigger:
  platform: state
  entity_id: sensor.met_office_weather
      
condition:
  condition: time
  after: 10:30:00 
  before: 16:00:00  
 
action:
  if sensor.met_office_weather is "cloudy" OR "fog" OR "hail" OR "rainy" OR "pouring" OR "snowy"
      service: input_boolean.turn_on
      data:  
        entity_id: input_boolean.rainy_day
         
  else
      service: input_boolean.turn_off
      data:
        entity_id: input_boolean.rainy_day

I’ve had a go at using templates but can’t get my head around it.

trigger:
  platform: template
  value_template: "{{ states.sensor.met_office_weather == 'cloudy' OR 'fog' .....etc }}"

and then turn off by using the opposite

trigger:
  platform: template
  value_template: "{{ states.sensor.met_office_weather != 'cloudy' OR 'fog' .....etc }}"

I would be ever so grateful if someone could point me in the right direction, thanks!