- id: 'spotswitchtimer'
  alias: UpdateSpotswitches
  description: Update virtual switches from spotswitch.net API
  trigger:
  # replace seconds with your zipcode divided by 166, for example 1217 WD, it is 7,331 so 7
  - platform: time_pattern
    minutes: 0
    seconds: 7
  - platform: time_pattern
    minutes: 1
    seconds: 7
  - platform: time_pattern
    minutes: 2
    seconds: 7
  - platform: time_pattern
    minutes: 3
    seconds: 7
  - platform: time_pattern
    minutes: 4
    seconds: 7
  condition: []
  action:
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id: sensor.spotswitch_states
  mode: single
