Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Time of Use Control - Exergy HA Blueprint

Schedule your bitcoin miner to run during specific times based on electricity rates, daily schedules, or personal preferences.

Before You Start

How It Works

This automation controls when your miner operates:

  • Run during cheap electricity (off-peak hours)
  • Reduce or stop during expensive hours (peak rates)
  • Follow a weekly schedule for consistent operation
  • Combine with other automations for advanced control

Use Cases

Time-of-Use Electricity Rates

Many utilities charge different rates throughout the day:

  • Off-peak: Evenings, nights, weekends (cheapest)
  • Mid-peak: Morning, late evening
  • On-peak: Afternoon hours (most expensive)

Run your miner during off-peak hours to maximize profitability.

Noise Considerations

  • Run at full power when away from home
  • Reduce to eco/night mode during sleeping hours
  • Pause during important calls or meetings

Seasonal Adjustments

  • Run more during heating season
  • Reduce during summer months
  • Adjust based on weather conditions

Automation Installation

To use the YAML automation examples in this guide:

  1. Copy the desired YAML code from the examples below
  2. In Home Assistant, navigate to Settings → Automations & Scenes
  3. Click the three-dot menu (⋮) in the top right corner
  4. Select Edit in YAML
  5. Paste the copied YAML code at the bottom of your automations file
  6. Adjust the entity_id values to match your specific miner entities
  7. Click Save
  8. The new automation(s) will appear in your automations list

Alternatively, you can create each automation through the UI and manually configure the triggers, conditions, and actions based on the examples.

Configuration

Required Inputs

InputDescription
Miner EntityYour miner’s power switch
ScheduleTime periods and desired actions

Schedule Options

For each time period, choose:

  • Full Power: Mining mode at maximum
  • Eco Mode: Reduced power/noise
  • Night Mode: Quiet operation
  • Off: Completely powered down

Example Schedules

Basic Peak/Off-Peak (California TOU)

TimeActionReason
12:00 AM - 4:00 PMFull PowerOff-peak rates
4:00 PM - 9:00 PMEco ModePeak rates
9:00 PM - 12:00 AMFull PowerOff-peak rates

Work from Home

TimeDayActionReason
6:00 AM - 8:00 AMWeekdaysNight ModeMorning routine
8:00 AM - 6:00 PMWeekdaysEco ModeWorking hours (noise)
6:00 PM - 10:00 PMWeekdaysFull PowerEvening heating
10:00 PM - 6:00 AMAll daysNight ModeSleeping hours
All dayWeekendsFull PowerAway or flexible

Heating Season Focus

MonthDefault Mode
Oct - MarFull Power (heating needed)
Apr - MayEco Mode (mild weather)
Jun - SepOff or Eco (no heat needed)

Manual YAML Examples

Simple Peak/Off-Peak

automation:
  - alias: "Miner Off-Peak - Full Power"
    trigger:
      - platform: time
        at: "21:00:00"
    action:
      - service: switch.turn_on
        target:
          entity_id: switch.avalon_mini_3_power
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_mode
        data:
          option: "Mining"
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_level
        data:
          option: "Super"

  - alias: "Miner Peak - Eco Mode"
    trigger:
      - platform: time
        at: "16:00:00"
    action:
      - service: switch.turn_on
        target:
          entity_id: switch.avalon_mini_3_power
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_mode
        data:
          option: "Heating"
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_level
        data:
          option: "Eco"

Weekly Schedule with Conditions

automation:
  - alias: "Miner Weekday Work Hours - Quiet"
    trigger:
      - platform: time
        at: "08:00:00"
    condition:
      - condition: time
        weekday:
          - mon
          - tue
          - wed
          - thu
          - fri
    action:
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_mode
        data:
          option: "Night"

  - alias: "Miner Weekend - Full Power"
    trigger:
      - platform: time
        at: "00:00:00"
    condition:
      - condition: time
        weekday:
          - sat
          - sun
    action:
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_mode
        data:
          option: "Heating"
      - service: select.select_option
        target:
          entity_id: select.avalon_mini_3_work_level
        data:
          option: "Super"

Dynamic Rate Integration

If you have a utility rate sensor (via integration):

automation:
  - alias: "Miner Rate-Based Control"
    trigger:
      - platform: state
        entity_id: sensor.utility_rate_tier
    action:
      - choose:
          - conditions:
              - condition: state
                entity_id: sensor.utility_rate_tier
                state: "off_peak"
            sequence:
              - service: switch.turn_on
                target:
                  entity_id: switch.avalon_mini_3_power
          - conditions:
              - condition: state
                entity_id: sensor.utility_rate_tier
                state: "on_peak"
            sequence:
              - service: switch.turn_off
                target:
                  entity_id: switch.avalon_mini_3_power

Note: You can also make your own utility rate sensor via a helper entity

Combining with Temperature Control

Time-of-use works alongside thermostat control:

  1. Time-of-use sets the maximum allowed operation
  2. Thermostat control decides within those windows

Example:

  • Off-peak: Thermostat can control miner freely
  • Peak: Miner stays off regardless of temperature
automation:
  - alias: "Peak Hours - Override Thermostat"
    trigger:
      - platform: time
        at: "16:00:00"
    action:
      - service: climate.set_hvac_mode
        target:
          entity_id: climate.your_thermostat
        data:
          hvac_mode: "off"

  - alias: "Off-Peak - Enable Thermostat"
    trigger:
      - platform: time
        at: "21:00:00"
    action:
      - service: climate.set_hvac_mode
        target:
          entity_id: climate.your_thermostat
        data:
          hvac_mode: "heat"

Tips

Find Your Utility Rates

  • Check your utility bill for TOU schedule
  • Look for “Time of Use” or “TOU” rate plans
  • Some utilities offer APIs or integrations

Buffer Times

Add 15-30 minutes buffer before peak times:

  • Prevents running into peak rates
  • Allows miner to cool down gracefully

Seasonal Adjustments

Create separate automations for:

  • Winter (heating priority)
  • Summer (mining only when profitable)
  • Shoulder seasons (flexible)

Dynamic Control of TOU Times

Create separate ‘helper’ entities to edit on the fly such as:

  • Create a date and/or time helper to set the different TOU periods
    • Easier to edit this entity than the automation
  • Create a schedule helper to build out different triggers based on time periods

Troubleshooting

Miner not following schedule

  • Check automation triggers are correct
  • Verify time zone settings in HA
  • Look for conflicting automations

Overlapping automations

  • Review all miner-related automations
  • Use automation groups or modes
  • Consider a single “scheduler” automation

Resources