Automation to randomly toggle swtich from group?

Hope someone can help me,

I have 4 switches in a group, what I would like to do is randomly (maybe every 30 mins) toggle one of the switches in the group at random? this feels like something really simple but I am struggling, hopefuly someone can help me…


Just to update, I managed to get this working witht he following yaml

alias: Change House Lights
description: ""
  - platform: time_pattern
    minutes: /30
condition: []
  - service: switch.toggle
    data: {}
      entity_id: "{{ states.switch.xmas_buildings.attributes.entity_id | random }}"
mode: single