Had some time to do this example for you:
Utility meter
utility_meter: # you will need to adjust this to use your sensor
energy_from_grid_daily:
source: sensor.energy_import
cycle: daily
tariffs:
- Peak
- Offpeak
- Peak High Demand
- Offpeak High Demand
Template sensor
template:
- sensor:
- name: Current Tariff
state: >
{% if 5 < now().month < 9 %}
{% if 6 <= now().hour < 18 %}
Peak High Demand
{% else %}
Offpeak High Demand
{% endif %}
{% else %}
{% if 6 <= now().hour < 18 %}
Peak
{% else %}
Offpeak
{% endif %}
Automation
triggers:
- trigger: state
entity_id: sensor.current_tariff
not_to:
- unknown
- unavailable
actions:
- action: select.select_option
target:
entity_id:
- select.energy_from_grid_daily
data:
option: >
{{ states('sensor.current_tariff') }}