Skip to content

Instantly share code, notes, and snippets.

@patrick3399
Last active September 26, 2025 13:07
Show Gist options
  • Select an option

  • Save patrick3399/1124b72025518ba01212f7882007fef2 to your computer and use it in GitHub Desktop.

Select an option

Save patrick3399/1124b72025518ba01212f7882007fef2 to your computer and use it in GitHub Desktop.
Hasivo POE Switch UI for Home Assistant
type: entities
entities:
- entity: sensor.hasivo_switch_cpu_temperature
type: custom:multiple-entity-row
name: Switch
state_header: CPU Temp
icon: mdi:switch
styles:
width: 60px
entities:
- entity: sensor.hasivo_switch_fan_status
name: Fan Status
- entity: sensor.hasivo_switch_cpu_usage
name: CPU Usage
- entity: sensor.hasivo_switch_ram_usage
name: RAM Usage
- entity: sensor.hasivo_switch_system_temperature
name: System Temp
- type: custom:fold-entity-row
head:
type: custom:multiple-entity-row
entity: sensor.hasivo_poe_used_power
name: Port Status
icon: mdi:lightning-bolt
state_header: Power
styles:
width: 60px
entities:
- entity: sensor.hasivo_poe_total_voltage
name: Voltage
styles:
width: 60px
- entity: sensor.hasivo_poe_usage_percent
name: Usage
styles:
width: 60px
entities:
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_1_link
state_header: Link
name: P1
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_1_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_1_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_1_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_1_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_1_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_1_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_1_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_1_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_1_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_1_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_2_link
state_header: Link
name: P2
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_2_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_2_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_2_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_2_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_2_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_2_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_2_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_2_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_2_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_2_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_3_link
state_header: Link
name: P3
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_3_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_3_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_3_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_3_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_3_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_3_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_3_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_3_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_3_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_3_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_4_link
state_header: Link
name: P4
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_4_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_4_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_4_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_4_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_4_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_4_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_4_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_4_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_4_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_4_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_5_link
state_header: Link
name: P5
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_5_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_5_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_5_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_5_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_5_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_5_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_5_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_5_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_5_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_5_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_6_link
state_header: Link
name: P6
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_6_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_6_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_6_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_6_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_6_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_6_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_6_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_6_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_6_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_6_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_7_link
state_header: Link
name: P7
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_7_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_7_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_7_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_7_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_7_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_7_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_7_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_7_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_7_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_7_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_8_link
state_header: Link
name: P8
icon: mdi:ethernet
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_8_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_8_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_8_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_8_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_8_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_8_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_poe_port_8_power_type
name: Type
styles:
width: 50px
- entity: sensor.hasivo_poe_port_8_current
name: Current
hide_if: unavailable
styles:
width: 35px
- entity: sensor.hasivo_poe_port_8_power
name: Power
hide_if: unavailable
styles:
width: 35px
- entity: switch.hasivo_poe_port_8_control
name: POE
toggle: true
hide_if: unavailable
styles:
width: 40px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_9_link
state_header: Link
name: P9
icon: mdi:ethernet-cable
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_9_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_9_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_9_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_9_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_9_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_9_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_port_9_temperature
name: Temp
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_9_voltage
name: Voltage
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_9_tx_current
name: Tx Current
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_9_tx_power
name: Tx Power
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_9_rx_power
name: Rx Power
hide_if: unavailable
styles:
width: 30px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_10_link
state_header: Link
name: P10
icon: mdi:ethernet-cable
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_10_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_10_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_10_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_10_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_10_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_10_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_port_10_temperature
name: Temp
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_10_voltage
name: Voltage
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_10_tx_current
name: Tx Current
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_10_tx_power
name: Tx Power
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_10_rx_power
name: Rx Power
hide_if: unavailable
styles:
width: 30px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_11_link
state_header: Link
name: P11
icon: mdi:ethernet-cable
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_11_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_11_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_11_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_11_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_11_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_11_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_port_11_temperature
name: Temp
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_11_voltage
name: Voltage
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_11_tx_current
name: Tx Current
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_11_tx_power
name: Tx Power
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_11_rx_power
name: Rx Power
hide_if: unavailable
styles:
width: 30px
- type: custom:multiple-entity-row
entity: sensor.hasivo_port_12_link
state_header: Link
name: P12
icon: mdi:ethernet-cable
state_color: false
styles:
width: 30px
text-align: middle
card_mod:
style:
hui-generic-entity-row $ state-badge $ ha-state-icon $ ha-icon $ ha-svg-icon: |
:host {
{% if not is_state('sensor.hasivo_port_12_link', 'Down') %}
color: orange !important;
{% endif %}
}
.: |
hui-generic-entity-row .state {
{% if is_state('sensor.hasivo_port_12_link', 'Down') %}
color: #cc0000 !important;
{% elif is_state('sensor.hasivo_port_12_link', '10G') %}
color: #00ccff !important;
{% elif is_state('sensor.hasivo_port_12_link', '1G') %}
color: green !important;
{% elif is_state('sensor.hasivo_port_12_link', '100M') %}
color: orange !important;
{% elif is_state('sensor.hasivo_port_12_link', '10M') %}
color: yellow !important;
{% else %}
color: gray !important;
{% endif %}
}
entities:
- entity: sensor.hasivo_port_12_temperature
name: Temp
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_12_voltage
name: Voltage
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_12_tx_current
name: Tx Current
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_12_tx_power
name: Tx Power
hide_if: unavailable
styles:
width: 30px
- entity: sensor.hasivo_port_12_rx_power
name: Rx Power
hide_if: unavailable
styles:
width: 30px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment