You can configure 
ESRP to track hardware
        status. If a power supply fails, if the switch is overheating, or if a non-fully loaded
        power supply is detected, the priority for the ESRP domain will change to the failover
        settings. 

Note   
ExtremeXOS software determines the maximum
          available power required for the switch by calculating the number of power supplies and
          the power required by the installed modules. Enabling environmental tracking on the switch
          without enough power budget causes tracking to fail. In this case, the tracking failure
          occurs by design.
To configure the failover priority for an ESRP domain:
    
    - 
        Set the failover priority using the following
          command:
        
                    configure
          esrp esrpDomain add track-environment failover priority 
                 
- 
        Assign the priority flag precedence over the active ports
          count using the following command:
        
                    configure
          esrp esrpDomain election-policy [ports > track > priority | ports > track > priority > mac | priority > mac | priority > ports > track > mac | priority > track > ports > mac | sticky > ports > track > priority | sticky > ports > track > priority > mac | sticky > ports > weight > track > priority > mac | sticky > priority > mac | sticky > priority > ports > track > mac | sticky > priority > track > ports > mac | sticky > track > ports > priority | sticky > track > ports > priority > mac | track > ports > priority | track > ports > priority > mac] 
                 
Because the priority of both ESRP domains are set
      to the same value, ESRP will use the active ports count to determine the master ESRP
      domain.