Public Access
refactor(ups-hid): clean abstraction layers, strategy pattern for protocol selection and proper data structure
Signed-off-by: bullshit <coding@ow-software.pl>
This commit is contained in:
41 files changed
+4768
-3013
No files matched your search
@@ -0,0 +1,66 @@
|
||||
# European Voltage Defaults
|
||||
# Configuration template for European electrical standards (IEC 60038)
|
||||
# Use this as a base for European installations
|
||||
|
||||
substitutions:
|
||||
# European electrical standards
|
||||
nominal_voltage: "230V" # Standard European single-phase voltage (IEC 60038)
|
||||
frequency: "50Hz" # European frequency standard
|
||||
|
||||
# Regional timezone examples (adjust for your location)
|
||||
timezone: "Europe/Berlin" # Germany
|
||||
# timezone: "Europe/London" # United Kingdom
|
||||
# timezone: "Europe/Paris" # France
|
||||
# timezone: "Europe/Rome" # Italy
|
||||
# timezone: "Europe/Madrid" # Spain
|
||||
|
||||
# Base UPS configuration with European defaults
|
||||
ups_hid:
|
||||
id: ups_monitor
|
||||
update_interval: 30s
|
||||
protocol_timeout: 15s
|
||||
protocol: auto
|
||||
fallback_nominal_voltage: ${nominal_voltage}
|
||||
simulation_mode: false
|
||||
|
||||
# Time configuration with European timezone
|
||||
time:
|
||||
- platform: sntp
|
||||
id: sntp_time
|
||||
timezone: ${timezone}
|
||||
servers:
|
||||
- "pool.ntp.org"
|
||||
- "time.nist.gov"
|
||||
|
||||
# Logging optimized for European users
|
||||
logger:
|
||||
level: INFO
|
||||
logs:
|
||||
ups_hid: INFO
|
||||
|
||||
# WiFi configuration template
|
||||
wifi:
|
||||
# Configure your WiFi credentials
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# European WiFi channel optimization (1-13 allowed in EU)
|
||||
channel: 6
|
||||
|
||||
# Enable fast connect for better reconnection
|
||||
fast_connect: true
|
||||
|
||||
# Access point fallback (if main WiFi fails)
|
||||
ap:
|
||||
ssid: "${friendly_name} AP"
|
||||
password: !secret ap_password
|
||||
|
||||
# Optional: Home Assistant API with encryption
|
||||
api:
|
||||
encryption:
|
||||
key: !secret api_encryption_key
|
||||
|
||||
# Optional: Over-the-air updates
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
@@ -0,0 +1,65 @@
|
||||
# North American Voltage Defaults
|
||||
# Configuration template for North American electrical standards (NEMA)
|
||||
# Use this as a base for US/Canada installations
|
||||
|
||||
substitutions:
|
||||
# North American electrical standards
|
||||
nominal_voltage: "120V" # Standard North American single-phase voltage
|
||||
frequency: "60Hz" # North American frequency standard
|
||||
|
||||
# Regional timezone examples (adjust for your location)
|
||||
timezone: "America/New_York" # Eastern Time
|
||||
# timezone: "America/Chicago" # Central Time
|
||||
# timezone: "America/Denver" # Mountain Time
|
||||
# timezone: "America/Los_Angeles" # Pacific Time
|
||||
|
||||
# Base UPS configuration with North American defaults
|
||||
ups_hid:
|
||||
id: ups_monitor
|
||||
update_interval: 30s
|
||||
protocol_timeout: 15s
|
||||
protocol: auto
|
||||
fallback_nominal_voltage: ${nominal_voltage}
|
||||
simulation_mode: false
|
||||
|
||||
# Time configuration with North American timezone
|
||||
time:
|
||||
- platform: sntp
|
||||
id: sntp_time
|
||||
timezone: ${timezone}
|
||||
servers:
|
||||
- "pool.ntp.org"
|
||||
- "time.nist.gov"
|
||||
|
||||
# Logging optimized for North American users
|
||||
logger:
|
||||
level: INFO
|
||||
logs:
|
||||
ups_hid: INFO
|
||||
|
||||
# WiFi configuration template
|
||||
wifi:
|
||||
# Configure your WiFi credentials
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# North American WiFi channel optimization (1-11 allowed in US/Canada)
|
||||
channel: 6
|
||||
|
||||
# Enable fast connect for better reconnection
|
||||
fast_connect: true
|
||||
|
||||
# Access point fallback (if main WiFi fails)
|
||||
ap:
|
||||
ssid: "${friendly_name} AP"
|
||||
password: !secret ap_password
|
||||
|
||||
# Optional: Home Assistant API with encryption
|
||||
api:
|
||||
encryption:
|
||||
key: !secret api_encryption_key
|
||||
|
||||
# Optional: Over-the-air updates
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
Reference in new issue
Block a user