Public Access
feat(configs): grouping sensors and switching to new design
Signed-off-by: bullshit <coding@ow-software.pl>
This commit is contained in:
10 files changed
+907
-25
No files matched your search
@@ -0,0 +1,252 @@
|
||||
# Extended UPS Sensors Package with Entity Grouping
|
||||
# Additional sensors with improved organization
|
||||
# Use with: packages: !include configs/extended_sensors_grouped.yaml
|
||||
|
||||
sensor:
|
||||
# === BATTERY MONITORING GROUP ===
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Battery Voltage"
|
||||
id: battery_voltage
|
||||
type: battery_voltage
|
||||
unit_of_measurement: "V"
|
||||
device_class: voltage
|
||||
state_class: measurement
|
||||
accuracy_decimals: 1
|
||||
web_server:
|
||||
sorting_group_id: ups_battery_monitoring
|
||||
sorting_weight: 40
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Battery Voltage Nominal"
|
||||
id: battery_voltage_nominal
|
||||
type: battery_voltage_nominal
|
||||
unit_of_measurement: "V"
|
||||
device_class: voltage
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
web_server:
|
||||
sorting_group_id: ups_battery_monitoring
|
||||
sorting_weight: 50
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Battery Runtime Low Threshold"
|
||||
id: battery_runtime_low
|
||||
type: battery_runtime_low
|
||||
unit_of_measurement: "min"
|
||||
device_class: duration
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
web_server:
|
||||
sorting_group_id: ups_battery_monitoring
|
||||
sorting_weight: 60
|
||||
|
||||
# === VOLTAGE MONITORING GROUP ===
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Input Voltage Nominal"
|
||||
id: input_voltage_nominal
|
||||
type: input_voltage_nominal
|
||||
unit_of_measurement: "V"
|
||||
device_class: voltage
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
web_server:
|
||||
sorting_group_id: ups_voltage_monitoring
|
||||
sorting_weight: 30
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Input Transfer Low"
|
||||
id: input_transfer_low
|
||||
type: input_transfer_low
|
||||
unit_of_measurement: "V"
|
||||
device_class: voltage
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
web_server:
|
||||
sorting_group_id: ups_voltage_monitoring
|
||||
sorting_weight: 40
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Input Transfer High"
|
||||
id: input_transfer_high
|
||||
type: input_transfer_high
|
||||
unit_of_measurement: "V"
|
||||
device_class: voltage
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
web_server:
|
||||
sorting_group_id: ups_voltage_monitoring
|
||||
sorting_weight: 50
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Input Frequency"
|
||||
id: input_frequency
|
||||
type: frequency
|
||||
unit_of_measurement: "Hz"
|
||||
state_class: measurement
|
||||
accuracy_decimals: 1
|
||||
web_server:
|
||||
sorting_group_id: ups_voltage_monitoring
|
||||
sorting_weight: 60
|
||||
|
||||
# === LOAD MONITORING GROUP ===
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Real Power Nominal"
|
||||
id: ups_realpower_nominal
|
||||
type: ups_realpower_nominal
|
||||
unit_of_measurement: "W"
|
||||
device_class: power
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
web_server:
|
||||
sorting_group_id: ups_load_monitoring
|
||||
sorting_weight: 20
|
||||
|
||||
- platform: template
|
||||
name: "UPS Load Power"
|
||||
id: ups_load_power
|
||||
unit_of_measurement: "W"
|
||||
device_class: power
|
||||
state_class: measurement
|
||||
accuracy_decimals: 1
|
||||
lambda: |-
|
||||
if (!std::isnan(id(load_percentage).state)) {
|
||||
float ups_max_power = 700.0; // Default fallback
|
||||
|
||||
// Use HID nominal power if available
|
||||
if (!std::isnan(id(ups_realpower_nominal).state)) {
|
||||
ups_max_power = id(ups_realpower_nominal).state;
|
||||
}
|
||||
|
||||
return (ups_max_power * id(load_percentage).state) / 100.0;
|
||||
}
|
||||
return NAN;
|
||||
update_interval: 30s
|
||||
web_server:
|
||||
sorting_group_id: ups_load_monitoring
|
||||
sorting_weight: 30
|
||||
|
||||
# === CONFIGURATION GROUP ===
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Delay Shutdown"
|
||||
id: ups_delay_shutdown
|
||||
type: ups_delay_shutdown
|
||||
unit_of_measurement: "s"
|
||||
device_class: duration
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_configuration
|
||||
sorting_weight: 10
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Delay Start"
|
||||
id: ups_delay_start
|
||||
type: ups_delay_start
|
||||
unit_of_measurement: "s"
|
||||
device_class: duration
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_configuration
|
||||
sorting_weight: 20
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Delay Reboot"
|
||||
id: ups_delay_reboot
|
||||
type: ups_delay_reboot
|
||||
unit_of_measurement: "s"
|
||||
device_class: duration
|
||||
state_class: measurement
|
||||
accuracy_decimals: 0
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_configuration
|
||||
sorting_weight: 30
|
||||
|
||||
text_sensor:
|
||||
# === DEVICE INFORMATION GROUP ===
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Serial Number"
|
||||
id: ups_serial_number
|
||||
type: serial_number
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_device_info
|
||||
sorting_weight: 30
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Firmware Version"
|
||||
id: ups_firmware_version
|
||||
type: firmware_version
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_device_info
|
||||
sorting_weight: 40
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Manufacture Date"
|
||||
id: ups_manufacture_date
|
||||
type: ups_mfr_date
|
||||
icon: "mdi:calendar-clock"
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_device_info
|
||||
sorting_weight: 50
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Battery Status"
|
||||
id: battery_status
|
||||
type: battery_status
|
||||
icon: "mdi:battery-heart"
|
||||
web_server:
|
||||
sorting_group_id: ups_battery_monitoring
|
||||
sorting_weight: 70
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Firmware Auxiliary"
|
||||
id: firmware_aux
|
||||
type: ups_firmware_aux
|
||||
icon: "mdi:chip"
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_device_info
|
||||
sorting_weight: 60
|
||||
|
||||
# === CONFIGURATION GROUP ===
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "UPS Beeper Status"
|
||||
id: ups_beeper_status
|
||||
type: ups_beeper_status
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_configuration
|
||||
sorting_weight: 40
|
||||
|
||||
- platform: ups_hid
|
||||
ups_hid_id: ups_monitor
|
||||
name: "Input Sensitivity"
|
||||
id: input_sensitivity
|
||||
type: input_sensitivity
|
||||
entity_category: diagnostic
|
||||
web_server:
|
||||
sorting_group_id: ups_configuration
|
||||
sorting_weight: 50
|
||||
Reference in new issue
Block a user