From 149fac6ec024033cf4e581c4de6c5c9756450e88 Mon Sep 17 00:00:00 2001 From: CeeWeasel Date: Sat, 14 Mar 2026 16:26:42 -0400 Subject: [PATCH] Added some themes, but mostly updated power monitor to better wrangle the sensors and udpate_intervals to save DB space --- .../master_bedroom_lights_to_on.yaml | 3 - .../master_bedroom_white_noise_off.yaml | 5 + .../master_bedroom_white_noise_on.yaml | 5 + esphome/archive/full-power-monitor.yaml | 1961 +++++++++++++++++ esphome/black-bed.yaml | 2 + .../meter_sensors/6chan_addon1.yaml | 162 +- .../meter_sensors/6chan_addon2.yaml | 162 +- .../meter_sensors/6chan_addon3.yaml | 162 +- .../meter_sensors/6chan_main_sensor.yaml | 198 +- .../status_fields/6chan_main_status.yaml | 16 +- esphome/common/hx711_single.yaml | 3 + esphome/common/hx711_single_verbose.yaml | 3 + esphome/power-monitor.yaml | 62 +- themes/metro/metro.yaml | 1065 +++++++++ themes/mushroom/mushroom-shadow.yaml | 11 + themes/mushroom/mushroom-square-shadow.yaml | 22 + themes/mushroom/mushroom-square.yaml | 20 + themes/mushroom/mushroom.yaml | 9 + 18 files changed, 3632 insertions(+), 239 deletions(-) create mode 100644 esphome/archive/full-power-monitor.yaml create mode 100644 themes/metro/metro.yaml create mode 100644 themes/mushroom/mushroom-shadow.yaml create mode 100644 themes/mushroom/mushroom-square-shadow.yaml create mode 100644 themes/mushroom/mushroom-square.yaml create mode 100644 themes/mushroom/mushroom.yaml diff --git a/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml b/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml index a92fe56..891b2cf 100644 --- a/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml @@ -104,9 +104,6 @@ action: - switch.adaptive_lighting_bedroom - switch.adaptive_lighting_adapt_brightness_bedroom - switch.adaptive_lighting_adapt_color_bedroom - - action: switch.turn_off - target: - entity_id: switch.adaptive_lighting_sleep_mode_bedroom default: - action: switch.turn_off target: diff --git a/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml b/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml index d763528..ab8eb57 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml @@ -11,3 +11,8 @@ action: data: {} target: entity_id: media_player.ma_bedroom_hub + + - action: switch.turn_off + data: {} + target: + entity_id: switch.adaptive_lighting_sleep_mode_bedroom \ No newline at end of file diff --git a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml index 3a12ff2..219b57d 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml @@ -14,3 +14,8 @@ action: volume: 0.35 repeat: all shuffle: false + + - action: switch.turn_on + data: {} + target: + entity_id: switch.adaptive_lighting_sleep_mode_bedroom diff --git a/esphome/archive/full-power-monitor.yaml b/esphome/archive/full-power-monitor.yaml new file mode 100644 index 0000000..2a28c37 --- /dev/null +++ b/esphome/archive/full-power-monitor.yaml @@ -0,0 +1,1961 @@ +substitutions: + mqtt_root_topic: esphome + devicename: power-monitor + disp_name: power-monitor + friendly_name: Power Monitor + entity_name: power_monitor + comment: Circuit Setup Power Monitor + static_ip: 10.20.0.10 + platform: ESP32 + board: nodemcu-32s + update_time: 2s + kwh_report_interval: 60s + watt_heartbeat: 60s + throttle_time: 60s + watt_delta: '50.0' + grid_watt_delta: '200.0' + watt_label: W + amp_label: A + kwh_label: kWh + main_meter_name1: Meter 1-3 + main_meter_name2: Meter 4-6 + main_meter_id1: meter_main1 + main_meter_id2: meter_main2 + addon1_name1: Addon1 7-9 + addon1_name2: Addon1 10-12 + addon1_id1: addon1_1 + addon1_id2: addon1_2 + addon2_name1: Addon2 13-15 + addon2_name2: Addon2 16-18 + addon2_id1: addon2_1 + addon2_id2: addon2_2 + addon3_name1: Addon3 19-21 + addon3_name2: Addon3 22-24 + addon3_id1: addon3_1 + addon3_id2: addon3_2 + ct1_name: Grid Phase A + ct4_name: Grid Phase B + ct22_name: Well + ct12_name: Kitchen 1 + ct16_name: Kitchen 2 + ct18_name: Laundry Plug + ct8_name: Microwave Plug + ct17_name: Bathroom Plug + ct11_name: Heat Pump + ct24_name: Basement Bedroom and Furnace Room Lights + ct5_name: Basement Plugs + ct23_name: Basement and Laundry Lights and Plugs + ct7_name: Sump Pump Plug + ct6_name: Nursery, Dining, Kitchen Lights + ct20_name: Master Suite + ct3_name: Furnace + ct15_name: Basement Stairs and Lights + ct21_name: Dishwasher + ct13_name: Garage Outside and Front Garage Lights + ct10_name: Front Room Plugs + ct14_name: Garage and Outside Plugs + ct9_name: Stove + ct2_name: Dryer + ct19_name: Unused + sct006: '11143' + sct010: '41660' + sct013: '27518' + sct016: '41787' + current_cal_ct1: '41787' + current_cal_ct2: '41660' + current_cal_ct3: '11143' + current_cal_ct4: '41787' + current_cal_ct5: '11143' + current_cal_ct6: '11143' + current_cal_ct7: '11143' + current_cal_ct8: '11143' + current_cal_ct9: '27518' + current_cal_ct10: '11143' + current_cal_ct11: '41660' + current_cal_ct12: '11143' + current_cal_ct13: '11143' + current_cal_ct14: '11143' + current_cal_ct15: '11143' + current_cal_ct16: '11143' + current_cal_ct17: '11143' + current_cal_ct18: '11143' + current_cal_ct19: '11143' + current_cal_ct20: '11143' + current_cal_ct21: '11143' + current_cal_ct22: '41660' + current_cal_ct23: '11143' + current_cal_ct24: '11143' + voltage_cal1: '7305' + voltage_cal2: '7305' + electric_freq: 60Hz + offset_calibration: 'true' + gain_calibration: 'true' + spi_clk: 18 + spi_miso: 19 + spi_mosi: 23 + main_ic1: 5 + addon1_ic1: 0 + addon2_ic1: 27 + addon3_ic1: 2 + main_ic2: 4 + addon1_ic2: 16 + addon2_ic2: 17 + addon3_ic2: 21 +esphome: + name: power-monitor + comment: Circuit Setup Power Monitor + friendly_name: Power Monitor + name_add_mac_suffix: false + min_version: 2025.7.0 + project: + name: clever.6c-energy-meter-3-addons + version: '1.7' + build_path: build/power-monitor + platformio_options: {} + environment_variables: {} + includes: [] + includes_c: [] + libraries: [] + debug_scheduler: false + compile_process_limit: 3 + areas: [] + devices: [] +esp32: + board: nodemcu-32s + cpu_frequency: 240MHZ + framework: + type: esp-idf + version: 5.5.2 + sdkconfig_options: {} + log_level: ERROR + advanced: + compiler_optimization: SIZE + enable_idf_experimental_features: false + enable_lwip_assert: true + ignore_efuse_custom_mac: false + ignore_efuse_mac_crc: false + enable_lwip_mdns_queries: true + enable_lwip_bridge_interface: false + enable_lwip_tcpip_core_locking: true + enable_lwip_check_thread_safety: true + disable_libc_locks_in_iram: true + disable_vfs_support_termios: true + disable_vfs_support_select: true + disable_vfs_support_dir: true + freertos_in_iram: false + ringbuf_in_iram: false + heap_in_iram: false + execute_from_psram: false + loop_task_stack_size: 8192 + enable_ota_rollback: true + use_full_certificate_bundle: false + include_builtin_idf_components: [] + disable_debug_stubs: true + disable_ocd_aware: true + disable_usb_serial_jtag_secondary: true + disable_dev_null_vfs: true + disable_mbedtls_peer_cert: true + disable_mbedtls_pkcs7: true + disable_regi2c_in_iram: true + disable_fatfs: true + components: [] + platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip + source: pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.5.2/esp-idf-v5.5.2.tar.xz + flash_size: 4MB + variant: ESP32 +sensor: + - platform: wifi_signal + name: RSSI + id: local_wifi_signal_db + update_interval: 60s + entity_category: diagnostic + disabled_by_default: false + force_update: false + unit_of_measurement: dBm + accuracy_decimals: 0 + device_class: signal_strength + state_class: measurement + - platform: copy + source_id: local_wifi_signal_db + id: local_wifi_signal_percent + name: WiFi Signal Strength + filters: + - lambda: !lambda |- + return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: '%' + entity_category: diagnostic + device_class: '' + disabled_by_default: false + force_update: false + accuracy_decimals: 0 + state_class: measurement + - platform: uptime + name: Uptime + id: local_uptime_sensor + disabled_by_default: true + icon: mdi:timer-check + force_update: false + unit_of_measurement: s + accuracy_decimals: 0 + device_class: duration + state_class: total_increasing + entity_category: diagnostic + update_interval: 60s + type: seconds + - platform: debug + free: + name: Heap Free + id: heap_free_sensor + entity_category: diagnostic + disabled_by_default: false + force_update: false + unit_of_measurement: B + icon: mdi:counter + accuracy_decimals: 0 + loop_time: + name: Loop Time + id: loop_time_sensor + entity_category: diagnostic + disabled_by_default: false + force_update: false + unit_of_measurement: ms + icon: mdi:timer-outline + accuracy_decimals: 0 + - platform: atm90e32 + release_device: true + cs_pin: + number: 5 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: meter_main1 + phase_a: + voltage: + name: Voltage 1 + id: ic1Volts + accuracy_decimals: 1 + filters: + - or: + - delta: 0.5 + - heartbeat: 300s + disabled_by_default: false + force_update: false + unit_of_measurement: V + device_class: voltage + state_class: measurement + current: + name: Grid Phase A A + id: ct1Amps + accuracy_decimals: 2 + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: A + device_class: current + state_class: measurement + power: + name: Grid Phase A W + id: ct1Watts + accuracy_decimals: 1 + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 5.0 ? 0 : x; + - or: + - delta: 5.0 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: W + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 41787 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Dryer A + id: ct2Amps + accuracy_decimals: 2 + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Dryer/Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + device_class: current + state_class: measurement + power: + name: Dryer W + id: ct2Watts + accuracy_decimals: 1 + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 2.0 ? 0 : x; + - or: + - delta: 2.0 + - throttle: 60s + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Dryer/Watts + disabled_by_default: false + force_update: false + unit_of_measurement: W + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 41660 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Furnace A + id: ct3Amps + accuracy_decimals: 2 + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: A + device_class: current + state_class: measurement + power: + name: Furnace W + id: ct3Watts + accuracy_decimals: 1 + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 2.0 ? 0 : x; + - or: + - delta: 2.0 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: W + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + frequency: + name: Frequency 1 + disabled_by_default: false + force_update: false + unit_of_measurement: Hz + icon: mdi:current-ac + accuracy_decimals: 1 + state_class: measurement + chip_temperature: + name: Meter 1-3 Chip Temp + disabled_by_default: false + force_update: false + unit_of_measurement: °C + accuracy_decimals: 1 + device_class: temperature + state_class: measurement + entity_category: diagnostic + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: atm90e32 + release_device: true + cs_pin: + number: 4 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: meter_main2 + phase_a: + current: + name: Grid Phase B A + id: ct4Amps + accuracy_decimals: 2 + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: A + device_class: current + state_class: measurement + power: + name: Grid Phase B W + id: ct4Watts + accuracy_decimals: 1 + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 2.0 ? 0 : x; + - or: + - delta: 2.0 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: W + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 41787 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Basement Plugs A + id: ct5Amps + accuracy_decimals: 2 + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: A + device_class: current + state_class: measurement + power: + name: Basement Plugs W + id: ct5Watts + accuracy_decimals: 1 + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 2.0 ? 0 : x; + - or: + - delta: 2.0 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: W + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Nursery, Dining, Kitchen Lights A + id: ct6Amps + accuracy_decimals: 2 + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: A + device_class: current + state_class: measurement + power: + name: Nursery, Dining, Kitchen Lights W + id: ct6Watts + accuracy_decimals: 1 + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 2.0 ? 0 : x; + - or: + - delta: 2.0 + - throttle: 60s + disabled_by_default: false + force_update: false + unit_of_measurement: W + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + chip_temperature: + name: Meter 4-6 Chip Temp + disabled_by_default: false + force_update: false + unit_of_measurement: °C + accuracy_decimals: 1 + device_class: temperature + state_class: measurement + entity_category: diagnostic + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: template + name: Mainboard Total A + id: totalAmpsMain + lambda: !lambda |- + return id(ct1Amps).state + id(ct2Amps).state + id(ct3Amps).state + id(ct4Amps).state + id(ct5Amps).state + id(ct6Amps).state ; + accuracy_decimals: 2 + unit_of_measurement: A + device_class: current + update_interval: 2s + filters: + - lambda: !lambda |- + return x < 0.02 ? 0 : x; + - or: + - delta: 0.05 + - throttle: 60s + internal: true + disabled_by_default: false + force_update: false + - platform: template + name: Mainboard Total W + id: totalWattsMain + lambda: !lambda |- + return id(ct1Watts).state + id(ct2Watts).state + id(ct3Watts).state + id(ct4Watts).state + id(ct5Watts).state + id(ct6Watts).state ; + accuracy_decimals: 1 + unit_of_measurement: W + device_class: power + update_interval: 2s + filters: + - lambda: !lambda |- + return abs(x); + - lambda: !lambda |- + return x < 2.0 ? 0 : x; + - or: + - delta: 5.0 + - throttle: 60s + internal: true + disabled_by_default: false + force_update: false + - platform: total_daily_energy + name: Grid Phase A kWh + id: ct1Kwh + power_id: ct1Watts + accuracy_decimals: 3 + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + - platform: total_daily_energy + name: Dryer kWh + id: ct2Kwh + power_id: ct2Watts + accuracy_decimals: 3 + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Dryer/kWh + disabled_by_default: false + force_update: false + restore: true + method: right + - platform: total_daily_energy + name: Furnace kWh + id: ct3Kwh + power_id: ct3Watts + accuracy_decimals: 3 + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + - platform: total_daily_energy + name: Grid Phase B kWh + id: ct4Kwh + power_id: ct4Watts + accuracy_decimals: 3 + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + - platform: total_daily_energy + name: Basement Plugs kWh + id: ct5Kwh + power_id: ct5Watts + accuracy_decimals: 3 + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + - platform: total_daily_energy + name: Nursery, Dining, Kitchen Lights kWh + id: ct6Kwh + power_id: ct6Watts + accuracy_decimals: 3 + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + - platform: atm90e32 + release_device: true + cs_pin: + number: 0 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: addon1_1 + phase_a: + current: + name: Sump Pump Plug A + id: ct7Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Sump Pump Plug W + id: ct7Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Microwave Plug A + id: ct8Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Microwave Plug W + id: ct8Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Stove A + id: ct9Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Stove W + id: ct9Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 27518 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: atm90e32 + release_device: true + cs_pin: + number: 16 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: addon1_2 + phase_a: + current: + name: Front Room Plugs A + id: ct10Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Front Room Plugs W + id: ct10Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Heat Pump A + id: ct11Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Heat Pump W + id: ct11Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 41660 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Kitchen 1 A + id: ct12Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Kitchen 1 W + id: ct12Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: template + name: Add-on 1 Total A + id: totalAmpsAddOn1 + lambda: !lambda |- + return id(ct7Amps).state + id(ct8Amps).state + id(ct9Amps).state + id(ct10Amps).state + id(ct11Amps).state + id(ct12Amps).state ; + accuracy_decimals: 2 + unit_of_measurement: A + device_class: current + update_interval: 2s + internal: true + disabled_by_default: false + force_update: false + - platform: template + name: Add-on 1 Total W + id: totalWattsAddOn1 + lambda: !lambda |- + return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ; + accuracy_decimals: 2 + unit_of_measurement: W + device_class: power + update_interval: 2s + internal: true + disabled_by_default: false + force_update: false + - platform: total_daily_energy + name: Sump Pump Plug kWh + id: ct7Kwh + power_id: ct7Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Microwave Plug kWh + id: ct8Kwh + power_id: ct8Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Stove kWh + id: ct9Kwh + power_id: ct9Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Front Room Plugs kWh + id: ct10Kwh + power_id: ct10Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Heat Pump kWh + id: ct11Kwh + power_id: ct11Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Kitchen 1 kWh + id: ct12Kwh + power_id: ct12Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: atm90e32 + cs_pin: + number: 27 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + release_device: true + id: addon2_1 + phase_a: + current: + name: Garage Outside and Front Garage Lights A + id: ct13Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Garage Outside and Front Garage Lights W + id: ct13Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Garage and Outside Plugs A + id: ct14Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Garage and Outside Plugs W + id: ct14Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Basement Stairs and Lights A + id: ct15Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Basement Stairs and Lights W + id: ct15Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: atm90e32 + release_device: true + cs_pin: + number: 17 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: addon2_2 + phase_a: + current: + name: Kitchen 2 A + id: ct16Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Kitchen 2 W + id: ct16Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Bathroom Plug A + id: ct17Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Bathroom Plug W + id: ct17Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Laundry Plug A + id: ct18Amps + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Laundry Plug/Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Laundry Plug W + id: ct18Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Laundry Plug/Watts + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: template + name: Add-on 2 Total A + id: totalAmpsAddOn2 + lambda: !lambda |- + return id(ct13Amps).state + id(ct14Amps).state + id(ct15Amps).state + id(ct16Amps).state + id(ct17Amps).state + id(ct18Amps).state ; + accuracy_decimals: 2 + unit_of_measurement: A + device_class: current + update_interval: 2s + internal: true + disabled_by_default: false + force_update: false + - platform: template + name: Add-on 2 Total W + id: totalWattsAddOn2 + lambda: !lambda |- + return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ; + accuracy_decimals: 2 + unit_of_measurement: W + device_class: power + update_interval: 2s + internal: true + disabled_by_default: false + force_update: false + - platform: total_daily_energy + name: Garage Outside and Front Garage Lights kWh + id: ct13Kwh + power_id: ct13Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Garage and Outside Plugs kWh + id: ct14Kwh + power_id: ct14Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Basement Stairs and Lights kWh + id: ct15Kwh + power_id: ct15Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Kitchen 2 kWh + id: ct16Kwh + power_id: ct16Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Bathroom Plug kWh + id: ct17Kwh + power_id: ct17Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Laundry Plug kWh + id: ct18Kwh + power_id: ct18Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Laundry Plug/kWh + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: atm90e32 + release_device: true + cs_pin: + number: 2 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: addon3_1 + phase_a: + current: + name: Unused A + id: ct19Amps + internal: true + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Unused W + id: ct19Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + internal: true + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Master Suite A + id: ct20Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Master Suite W + id: ct20Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Dishwasher A + id: ct21Amps + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Dishwasher/Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Dishwasher W + id: ct21Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Dishwasher/Watts + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: atm90e32 + release_device: true + cs_pin: + number: 21 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + id: addon3_2 + phase_a: + current: + name: Well A + id: ct22Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Well W + id: ct22Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 5.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 41660 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_b: + current: + name: Basement and Laundry Lights and Plugs A + id: ct23Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Basement and Laundry Lights and Plugs W + id: ct23Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + phase_c: + current: + name: Basement Bedroom and Furnace Room Lights A + id: ct24Amps + disabled_by_default: false + force_update: false + unit_of_measurement: A + accuracy_decimals: 2 + device_class: current + state_class: measurement + power: + name: Basement Bedroom and Furnace Room Lights W + id: ct24Watts + filters: + - lambda: !lambda |- + if (x < 0) return x * -1; + return x; + - or: + - throttle: 60s + - delta: 2.0 + disabled_by_default: false + force_update: false + unit_of_measurement: W + accuracy_decimals: 2 + device_class: power + state_class: measurement + gain_voltage: 7305 + gain_ct: 11143 + offset_voltage: 0 + offset_current: 0 + offset_active_power: 0 + offset_reactive_power: 0 + line_frequency: 60HZ + gain_pga: 1X + update_interval: 2s + enable_offset_calibration: true + enable_gain_calibration: true + current_phases: '3' + peak_current_signed: false + - platform: template + name: Add-on 3 Total A + id: totalAmpsAddOn3 + lambda: !lambda |- + return id(ct19Amps).state + id(ct20Amps).state + id(ct21Amps).state + id(ct22Amps).state + id(ct23Amps).state + id(ct24Amps).state ; + accuracy_decimals: 2 + unit_of_measurement: A + device_class: current + update_interval: 2s + internal: true + disabled_by_default: false + force_update: false + - platform: template + name: Add-on 3 Total W + id: totalWattsAddOn3 + lambda: !lambda |- + return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ; + accuracy_decimals: 2 + unit_of_measurement: W + device_class: power + update_interval: 2s + internal: true + disabled_by_default: false + force_update: false + - platform: total_daily_energy + name: Master Suite kWh + id: ct20Kwh + power_id: ct20Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Dishwasher kWh + id: ct21Kwh + power_id: ct21Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + qos: 0 + retain: true + state_topic: esphome/power-monitor/sensor/Dishwasher/kWh + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Well kWh + id: ct22Kwh + power_id: ct22Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Basement and Laundry Lights and Plugs kWh + id: ct23Kwh + power_id: ct23Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: total_daily_energy + name: Basement Bedroom and Furnace Room Lights kWh + id: ct24Kwh + power_id: ct24Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 4 + - platform: template + name: Grid A + id: totalAmpsFromGrid + lambda: !lambda |- + return id(ct1Amps).state + id(ct4Amps).state ; + accuracy_decimals: 1 + unit_of_measurement: A + device_class: current + state_class: measurement + update_interval: 2s + disabled_by_default: false + force_update: false + - platform: template + name: Grid W + id: totalWattsFromGrid + lambda: !lambda |- + return id(ct1Watts).state + id(ct4Watts).state ; + accuracy_decimals: 1 + unit_of_measurement: W + device_class: power + state_class: measurement + update_interval: 2s + disabled_by_default: false + force_update: false + - platform: total_daily_energy + name: Grid kWh + power_id: totalWattsFromGrid + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + disabled_by_default: false + force_update: false + restore: true + method: right + accuracy_decimals: 3 +text_sensor: + - platform: wifi_info + ip_address: + name: IP + icon: mdi:ip + disabled_by_default: true + entity_category: diagnostic + ssid: + name: SSID + icon: mdi:lan + disabled_by_default: true + entity_category: diagnostic + bssid: + name: BSSID + disabled_by_default: true + icon: mdi:router-network + entity_category: diagnostic + mac_address: + name: Wifi MAC Address + disabled_by_default: true + icon: mdi:wifi-cog + entity_category: diagnostic + - platform: version + name: ESPHome Version + hide_timestamp: true + disabled_by_default: true + icon: mdi:chip + entity_category: diagnostic + - platform: atm90e32 + id: meter_main1 + phase_status: + phase_a: + name: Grid Phase A Status + disabled_by_default: false + icon: mdi:flash-alert + phase_b: + name: Dryer Status + disabled_by_default: false + icon: mdi:flash-alert + phase_c: + name: Furnace Status + disabled_by_default: false + icon: mdi:flash-alert + frequency_status: + name: Frequency Status 1 + disabled_by_default: false + icon: mdi:lightbulb-alert + - platform: atm90e32 + id: meter_main2 + phase_status: + phase_a: + name: Grid Phase B Status + disabled_by_default: false + icon: mdi:flash-alert + phase_b: + name: Basement Plugs Status + disabled_by_default: false + icon: mdi:flash-alert + phase_c: + name: Nursery, Dining, Kitchen Lights Status + disabled_by_default: false + icon: mdi:flash-alert +wifi: + fast_connect: true + min_auth_mode: WPA2 + use_address: power-monitor.local + networks: + - ssid: CleverIoT + password: Clev3r!0tNetw0rk + hidden: true + priority: 0 + manual_ip: + static_ip: 10.20.0.10 + gateway: 10.20.0.1 + subnet: 255.255.254.0 + dns1: 10.20.0.1 + dns2: 0.0.0.0 + ap: + ssid: Power Monitor + password: T0t@l1y1 for EspHome + ap_timeout: 90s + domain: .local + reboot_timeout: 15min + power_save_mode: LIGHT + enable_btm: false + enable_rrm: false + passive_scan: false + enable_on_boot: true + post_connect_roaming: true +binary_sensor: + - platform: status + name: Status + id: local_status_sensor + disabled_by_default: false + entity_category: diagnostic + device_class: connectivity + update_interval: 1s +button: + - platform: restart + name: Restart + id: local_restart_button + disabled_by_default: false + icon: mdi:restart + entity_category: config + device_class: restart +logger: + baud_rate: 115200 + tx_buffer_size: 512 + deassert_rts_dtr: false + task_log_buffer_size: 768 + hardware_uart: UART0 + level: DEBUG + logs: {} + runtime_tag_levels: false +time: + - platform: homeassistant + id: local_homeassistant_time + timezone: EST5EDT,M3.2.0,M11.1.0 + update_interval: 15min +api: + reboot_timeout: 0s + encryption: + key: xEm0LDYZu2hPE6ghYsjpmOvIZruDFN9lWt3eMz//9u4= + port: 6053 + batch_delay: 100ms + custom_services: false + homeassistant_services: false + homeassistant_states: false + listen_backlog: 4 + max_connections: 8 + max_send_queue: 8 +ota: + - platform: esphome + password: 43ab0acfb616a17b7c1259d743e3e02b + version: 2 + port: 3232 +debug: + update_interval: 10s +mqtt: + broker: 192.168.1.11 + port: 1883 + username: Esphome2MQTT + password: =iB!6+Yn6gLen9ru2|Qj*u"#] + discover_ip: false + discovery: false + discovery_retain: false + topic_prefix: '' + birth_message: + topic: esphome/power-monitor/availability + payload: online + qos: 0 + retain: true + will_message: + topic: esphome/power-monitor/availability + payload: offline + qos: 0 + retain: true + shutdown_message: + topic: esphome/power-monitor/availability + payload: offline + qos: 0 + retain: true + enable_on_boot: true + clean_session: false + idf_send_async: false + skip_cert_cn_check: false + discovery_prefix: homeassistant + discovery_unique_id_generator: legacy + discovery_object_id_generator: none + use_abbreviations: true + keepalive: 15s + reboot_timeout: 15min + publish_nan_as_none: false + wait_for_connection: false + log_topic: {} +spi: + - clk_pin: + number: 18 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + miso_pin: + number: 19 + mode: + input: true + output: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + mosi_pin: + number: 23 + mode: + output: true + input: false + open_drain: false + pullup: false + pulldown: false + inverted: false + ignore_pin_validation_error: false + ignore_strapping_warning: false + drive_strength: 20.0 + interface: any + type: single + interface_index: 0 \ No newline at end of file diff --git a/esphome/black-bed.yaml b/esphome/black-bed.yaml index 387611f..608bad6 100644 --- a/esphome/black-bed.yaml +++ b/esphome/black-bed.yaml @@ -27,6 +27,8 @@ packages: esp8266: board: nodemcuv2 +captive_portal: + # font: # - file: 'fonts/mdi.ttf' # id: mdi_weather diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml index 2a1aaa5..e550f0b 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml @@ -12,48 +12,78 @@ sensor: current: name: ${ct7_name} ${amp_label} id: ct7Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct7_name} ${watt_label} id: ct7Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct7} phase_b: current: name: ${ct8_name} ${amp_label} id: ct8Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct8_name} ${watt_label} id: ct8Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct8} phase_c: current: name: ${ct9_name} ${amp_label} id: ct9Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct9_name} ${watt_label} id: ct9Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct9} line_frequency: ${electric_freq} @@ -71,48 +101,78 @@ sensor: current: name: ${ct10_name} ${amp_label} id: ct10Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct10_name} ${watt_label} id: ct10Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct10} phase_b: current: name: ${ct11_name} ${amp_label} id: ct11Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct11_name} ${watt_label} id: ct11Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct11} phase_c: current: name: ${ct12_name} ${amp_label} id: ct12Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct12_name} ${watt_label} id: ct12Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct12} line_frequency: ${electric_freq} @@ -121,25 +181,25 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total A AddOn1 - - platform: template - name: Add-on 1 Total ${amp_label} - id: totalAmpsAddOn1 - lambda: return id(ct7Amps).state + id(ct8Amps).state + id(ct9Amps).state + id(ct10Amps).state + id(ct11Amps).state + id(ct12Amps).state ; - accuracy_decimals: 2 - unit_of_measurement: A - device_class: current - update_interval: ${update_time} +# #Total A AddOn1 +# - platform: template +# name: Add-on 1 Total ${amp_label} +# id: totalAmpsAddOn1 +# lambda: return id(ct7Amps).state + id(ct8Amps).state + id(ct9Amps).state + id(ct10Amps).state + id(ct11Amps).state + id(ct12Amps).state ; +# accuracy_decimals: 2 +# unit_of_measurement: A +# device_class: current +# update_interval: ${update_time} -#Total W AddOn1 - - platform: template - name: Add-on 1 Total ${watt_label} - id: totalWattsAddOn1 - lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ; - accuracy_decimals: 2 - unit_of_measurement: W - device_class: power - update_interval: ${update_time} +# #Total W AddOn1 +# - platform: template +# name: Add-on 1 Total ${watt_label} +# id: totalWattsAddOn1 +# lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ; +# accuracy_decimals: 2 +# unit_of_measurement: W +# device_class: power +# update_interval: ${update_time} #kWh From CT 7 - platform: total_daily_energy @@ -148,6 +208,7 @@ sensor: power_id: ct7Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -159,6 +220,7 @@ sensor: power_id: ct8Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -170,6 +232,7 @@ sensor: power_id: ct9Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -181,6 +244,7 @@ sensor: power_id: ct10Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -192,6 +256,7 @@ sensor: power_id: ct11Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -203,6 +268,7 @@ sensor: power_id: ct12Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing \ No newline at end of file diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml index d186051..59733e5 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml @@ -12,48 +12,78 @@ sensor: current: name: ${ct13_name} ${amp_label} id: ct13Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct13_name} ${watt_label} id: ct13Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct13} phase_b: current: name: ${ct14_name} ${amp_label} id: ct14Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct14_name} ${watt_label} id: ct14Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct14} phase_c: current: name: ${ct15_name} ${amp_label} id: ct15Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct15_name} ${watt_label} id: ct15Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct15} line_frequency: ${electric_freq} @@ -71,48 +101,78 @@ sensor: current: name: ${ct16_name} ${amp_label} id: ct16Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct16_name} ${watt_label} id: ct16Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct16} phase_b: current: name: ${ct17_name} ${amp_label} id: ct17Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct17_name} ${watt_label} id: ct17Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct17} phase_c: current: name: ${ct18_name} ${amp_label} id: ct18Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct18_name} ${watt_label} id: ct18Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct18} line_frequency: ${electric_freq} @@ -121,25 +181,25 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total A AddOn2 - - platform: template - name: Add-on 2 Total ${amp_label} - id: totalAmpsAddOn2 - lambda: return id(ct13Amps).state + id(ct14Amps).state + id(ct15Amps).state + id(ct16Amps).state + id(ct17Amps).state + id(ct18Amps).state ; - accuracy_decimals: 2 - unit_of_measurement: A - device_class: current - update_interval: ${update_time} +# #Total A AddOn2 +# - platform: template +# name: Add-on 2 Total ${amp_label} +# id: totalAmpsAddOn2 +# lambda: return id(ct13Amps).state + id(ct14Amps).state + id(ct15Amps).state + id(ct16Amps).state + id(ct17Amps).state + id(ct18Amps).state ; +# accuracy_decimals: 2 +# unit_of_measurement: A +# device_class: current +# update_interval: ${update_time} -#Total W AddOn2 - - platform: template - name: Add-on 2 Total ${watt_label} - id: totalWattsAddOn2 - lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ; - accuracy_decimals: 2 - unit_of_measurement: W - device_class: power - update_interval: ${update_time} +# #Total W AddOn2 +# - platform: template +# name: Add-on 2 Total ${watt_label} +# id: totalWattsAddOn2 +# lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ; +# accuracy_decimals: 2 +# unit_of_measurement: W +# device_class: power +# update_interval: ${update_time} #kWh From CT 13 - platform: total_daily_energy @@ -148,6 +208,7 @@ sensor: power_id: ct13Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -159,6 +220,7 @@ sensor: power_id: ct14Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -170,6 +232,7 @@ sensor: power_id: ct15Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -181,6 +244,7 @@ sensor: power_id: ct16Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -192,6 +256,7 @@ sensor: power_id: ct17Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -203,6 +268,7 @@ sensor: power_id: ct18Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing \ No newline at end of file diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml index 76089e1..3022767 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml @@ -13,48 +13,78 @@ sensor: current: name: ${ct19_name} ${amp_label} id: ct19Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct19_name} ${watt_label} id: ct19Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct19} phase_b: current: name: ${ct20_name} ${amp_label} id: ct20Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct20_name} ${watt_label} id: ct20Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct20} phase_c: current: name: ${ct21_name} ${amp_label} id: ct21Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct21_name} ${watt_label} id: ct21Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct21} line_frequency: ${electric_freq} @@ -72,48 +102,78 @@ sensor: current: name: ${ct22_name} ${amp_label} id: ct22Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct22_name} ${watt_label} id: ct22Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 5.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct22} phase_b: current: name: ${ct23_name} ${amp_label} id: ct23Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct23_name} ${watt_label} id: ct23Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct23} phase_c: current: name: ${ct24_name} ${amp_label} id: ct24Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct24_name} ${watt_label} id: ct24Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct24} line_frequency: ${electric_freq} @@ -122,25 +182,25 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total A AddOn3 - - platform: template - name: Add-on 3 Total ${amp_label} - id: totalAmpsAddOn3 - lambda: return id(ct19Amps).state + id(ct20Amps).state + id(ct21Amps).state + id(ct22Amps).state + id(ct23Amps).state + id(ct24Amps).state ; - accuracy_decimals: 2 - unit_of_measurement: A - device_class: current - update_interval: ${update_time} +# #Total A AddOn3 +# - platform: template +# name: Add-on 3 Total ${amp_label} +# id: totalAmpsAddOn3 +# lambda: return id(ct19Amps).state + id(ct20Amps).state + id(ct21Amps).state + id(ct22Amps).state + id(ct23Amps).state + id(ct24Amps).state ; +# accuracy_decimals: 2 +# unit_of_measurement: A +# device_class: current +# update_interval: ${update_time} -#Total W AddOn3 - - platform: template - name: Add-on 3 Total ${watt_label} - id: totalWattsAddOn3 - lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ; - accuracy_decimals: 2 - unit_of_measurement: W - device_class: power - update_interval: ${update_time} +# #Total W AddOn3 +# - platform: template +# name: Add-on 3 Total ${watt_label} +# id: totalWattsAddOn3 +# lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ; +# accuracy_decimals: 2 +# unit_of_measurement: W +# device_class: power +# update_interval: ${update_time} #kWh From CT 19 - platform: total_daily_energy @@ -149,6 +209,7 @@ sensor: power_id: ct19Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -160,6 +221,7 @@ sensor: power_id: ct20Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -171,6 +233,7 @@ sensor: power_id: ct21Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -182,6 +245,7 @@ sensor: power_id: ct22Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -193,6 +257,7 @@ sensor: power_id: ct23Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -204,6 +269,7 @@ sensor: power_id: ct24Watts filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing \ No newline at end of file diff --git a/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml b/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml index e296d58..7992941 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml @@ -9,56 +9,88 @@ sensor: voltage: name: Voltage 1 id: ic1Volts - accuracy_decimals: 1 + entity_category: diagnostic + accuracy_decimals: ${voltage_accuracy_decimals} + filters: + # Only log if voltage moves by 0.5V, or every 5 mins regardless + - or: + - delta: ${voltage_delta} + - heartbeat: ${voltage_heartbeat} current: name: ${ct1_name} ${amp_label} id: ct1Amps -# The max value for current that the meter can output is 65.535. If you expect to measure current over 65A, -# divide the gain_ct by 2 (120A CT) or 4 (200A CT) and multiply the current and power values by 2 or 4 by uncommenting the filter below -# filters: -# - multiply: 2 + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct1_name} ${watt_label} id: ct1Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 5.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_grid} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct1} phase_b: current: name: ${ct2_name} ${amp_label} id: ct2Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct2_name} ${watt_label} id: ct2Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 2.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_appliances} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct2} phase_c: current: name: ${ct3_name} ${amp_label} id: ct3Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct3_name} ${watt_label} id: ct3Watts + accuracy_decimals: 1 filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 2.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_appliances} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct3} frequency: @@ -77,56 +109,81 @@ sensor: cs_pin: ${main_ic2} id: ${main_meter_id2} phase_a: -#this voltage is only needed if monitoring 2 voltages -# voltage: -# name: Voltage 2 -# id: ic2Volts -# accuracy_decimals: 1 current: name: ${ct4_name} ${amp_label} id: ct4Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct4_name} ${watt_label} id: ct4Watts + accuracy_decimals: ${watt_accuracy_decimals} filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 2.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_grid} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct4} phase_b: current: name: ${ct5_name} ${amp_label} - id: ct5Amps + id: ct5 + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct5_name} ${watt_label} id: ct5Watts + accuracy_decimals: ${watt_accuracy_decimals} filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 2.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct5} phase_c: current: name: ${ct6_name} ${amp_label} id: ct6Amps + entity_category: diagnostic + accuracy_decimals: ${amp_accuracy_decimals} + filters: + # Drop noise below 0.02A, then log 0.05A changes or every 60s + - lambda: "return x < 0.02 ? 0 : x;" + - or: + - delta: ${amp_delta} + - throttle: ${amp_throttle} power: name: ${ct6_name} ${watt_label} id: ct6Watts + accuracy_decimals: ${watt_accuracy_decimals} filters: - - lambda: |- - if (x < 0) return x * -1; - return x; + # Convert negative to positive (absolute value) + - lambda: "return abs(x);" + # Clip "ghost" watts when the device is off + - lambda: "return x < 2.0 ? 0 : x;" - or: - - throttle: 60s - - delta: 2.0 + - delta: ${watt_delta_lights} + - throttle: ${watt_throttle} gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct6} #this is only needed if monitoring 2 voltages @@ -142,33 +199,50 @@ sensor: #Total A Main ################ - - platform: template - name: Mainboard Total ${amp_label} - id: totalAmpsMain - lambda: return id(ct1Amps).state + id(ct2Amps).state + id(ct3Amps).state + id(ct4Amps).state + id(ct5Amps).state + id(ct6Amps).state ; - accuracy_decimals: 2 - unit_of_measurement: A - device_class: current - update_interval: ${update_time} + # - platform: template + # name: Mainboard Total ${amp_label} + # id: totalAmpsMain + # entity_category: diagnostic + # lambda: return id(ct1Amps).state + id(ct2Amps).state + id(ct3Amps).state + id(ct4Amps).state + id(ct5Amps).state + id(ct6Amps).state ; + # accuracy_decimals: ${amp_accuracy_decimals} + # unit_of_measurement: A + # device_class: current + # update_interval: ${update_time} + # filters: + # # Drop noise below 0.02A, then log 0.05A changes or every 60s + # - lambda: "return x < 0.02 ? 0 : x;" + # - or: + # - delta: ${amp_delta} + # - throttle: ${amp_throttle} #Total W Main ################# - - platform: template - name: Mainboard Total ${watt_label} - id: totalWattsMain - lambda: return id(ct1Watts).state + id(ct2Watts).state + id(ct3Watts).state + id(ct4Watts).state + id(ct5Watts).state + id(ct6Watts).state ; - accuracy_decimals: 1 - unit_of_measurement: W - device_class: power - update_interval: ${update_time} + # - platform: template + # name: Mainboard Total ${watt_label} + # id: totalWattsMain + # lambda: return id(ct1Watts).state + id(ct2Watts).state + id(ct3Watts).state + id(ct4Watts).state + id(ct5Watts).state + id(ct6Watts).state ; + # accuracy_decimals: ${watt_accuracy_decimals} + # unit_of_measurement: ${watt_label} + # device_class: power + # update_interval: ${update_time} + # filters: + # # Convert negative to positive (absolute value) + # - lambda: "return abs(x);" + # # Clip "ghost" watts when the device is off + # - lambda: "return x < 2.0 ? 0 : x;" + # - or: + # - delta: ${watt_delta_grid} + # - throttle: ${watt_throttle} #kWh From CT 1 - platform: total_daily_energy name: ${ct1_name} ${kwh_label} id: ct1Kwh power_id: ct1Watts + accuracy_decimals: 3 filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -178,8 +252,10 @@ sensor: name: ${ct2_name} ${kwh_label} id: ct2Kwh power_id: ct2Watts + accuracy_decimals: 3 filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -189,8 +265,10 @@ sensor: name: ${ct3_name} ${kwh_label} id: ct3Kwh power_id: ct3Watts + accuracy_decimals: 3 filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -200,8 +278,10 @@ sensor: name: ${ct4_name} ${kwh_label} id: ct4Kwh power_id: ct4Watts + accuracy_decimals: 3 filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -211,8 +291,10 @@ sensor: name: ${ct5_name} ${kwh_label} id: ct5Kwh power_id: ct5Watts + accuracy_decimals: 3 filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing @@ -222,8 +304,10 @@ sensor: name: ${ct6_name} ${kwh_label} id: ct6Kwh power_id: ct6Watts + accuracy_decimals: 3 filters: - multiply: 0.001 + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing \ No newline at end of file diff --git a/esphome/circuit-setup/status_fields/6chan_main_status.yaml b/esphome/circuit-setup/status_fields/6chan_main_status.yaml index fe23653..ecb6206 100644 --- a/esphome/circuit-setup/status_fields/6chan_main_status.yaml +++ b/esphome/circuit-setup/status_fields/6chan_main_status.yaml @@ -9,10 +9,10 @@ text_sensor: phase_status: phase_a: name: "${ct1_name} Status" - phase_b: - name: "${ct2_name} Status" - phase_c: - name: "${ct3_name} Status" + # phase_b: + # name: "${ct2_name} Status" + # phase_c: + # name: "${ct3_name} Status" frequency_status: name: "Frequency Status 1" @@ -21,10 +21,10 @@ text_sensor: phase_status: phase_a: name: "${ct4_name} Status" - phase_b: - name: "${ct5_name} Status" - phase_c: - name: "${ct6_name} Status" + # phase_b: + # name: "${ct5_name} Status" + # phase_c: + # name: "${ct6_name} Status" #this is only needed if monitoring 2 voltages # freq_status: # name: "Frequency Status 2" diff --git a/esphome/common/hx711_single.yaml b/esphome/common/hx711_single.yaml index c2dc581..1aed776 100644 --- a/esphome/common/hx711_single.yaml +++ b/esphome/common/hx711_single.yaml @@ -134,6 +134,9 @@ sensor: } else { return x; } + - or: + - throttle: 60s + - delta: 1 binary_sensor: - platform: template diff --git a/esphome/common/hx711_single_verbose.yaml b/esphome/common/hx711_single_verbose.yaml index f8fc198..d8a0b3d 100644 --- a/esphome/common/hx711_single_verbose.yaml +++ b/esphome/common/hx711_single_verbose.yaml @@ -125,6 +125,9 @@ sensor: } else { return x; } + - or: + - throttle: 60s + - delta: 1 unit_of_measurement: lbs accuracy_decimals: 0 diff --git a/esphome/power-monitor.yaml b/esphome/power-monitor.yaml index 9b619de..cbbf585 100644 --- a/esphome/power-monitor.yaml +++ b/esphome/power-monitor.yaml @@ -13,7 +13,6 @@ substitutions: devicename: power-monitor - #disp_name: power-monitor disp_name: power-monitor friendly_name: 'Power Monitor' entity_name: power_monitor @@ -21,22 +20,28 @@ substitutions: static_ip: !secret power-monitor-ip platform: ESP32 board: nodemcu-32s - #update_time: 500ms - update_time: 5s + update_time: 2s kwh_report_interval: 60s watt_heartbeat: 60s throttle_time: 60s - watt_delta: "50.0" - #watt_delta: "5.0" - #grid_watt_delta: "10.0" - grid_watt_delta: "200.0" - #fast_update_time: 10s - #medium_update_time: 30s - #slow_update_time: 60s + watt_delta_lights: "2.0" + watt_delta_appliances: "10.0" + watt_delta_grid: "100.0" + watt_throttle: 60s + watt_accuracy_decimals: 1 watt_label: W + amp_delta: 0.05 + amp_throttle: 60s + amp_accuracy_decimals: 2 amp_label: A + voltage_delta: 0.5 + voltage_heartbeat: 300s + voltage_accuracy_decimals: 1 + voltage_label: V + kwh_throttle: 60s kwh_label: kWh + main_meter_name1: Meter 1-3 main_meter_name2: Meter 4-6 main_meter_id1: meter_main1 @@ -170,6 +175,8 @@ esp32: # ESPHome v2025.7.0 update to allow more than 6 SPI hardware devices on ESP-IDF type: esp-idf +captive_portal: + spi: clk_pin: ${spi_clk} miso_pin: ${spi_miso} @@ -236,22 +243,23 @@ sensor: # name: Frequency 2 ## Comment out to show amps and watts per meter board in Home Assistant - - id: !extend totalAmpsMain - internal: true - - id: !extend totalWattsMain - internal: true - - id: !extend totalAmpsAddOn1 - internal: true - - id: !extend totalWattsAddOn1 - internal: true - - id: !extend totalAmpsAddOn2 - internal: true - - id: !extend totalWattsAddOn2 - internal: true - - id: !extend totalAmpsAddOn3 - internal: true - - id: !extend totalWattsAddOn3 - internal: true + ## These were commented out altogether, so they wouldn't be calculated, even if they remained internal + # - id: !extend totalAmpsMain + # internal: true + # - id: !extend totalWattsMain + # # internal: true + # - id: !extend totalAmpsAddOn1 + # internal: true + # - id: !extend totalWattsAddOn1 + # internal: true + # - id: !extend totalAmpsAddOn2 + # internal: true + # - id: !extend totalWattsAddOn2 + # internal: true + # - id: !extend totalAmpsAddOn3 + # internal: true + # - id: !extend totalWattsAddOn3 + # internal: true - id: !extend ${addon3_id1} phase_a: @@ -384,7 +392,7 @@ sensor: power_id: totalWattsFromGrid filters: - multiply: 0.001 - # - heartbeat: ${kwh_report_interval} + - throttle: ${kwh_throttle} unit_of_measurement: kWh device_class: energy state_class: total_increasing diff --git a/themes/metro/metro.yaml b/themes/metro/metro.yaml new file mode 100644 index 0000000..4038e7b --- /dev/null +++ b/themes/metro/metro.yaml @@ -0,0 +1,1065 @@ +# Metrology Themes for Home Assistant +# Created by Madelena Mak 2022 https://mmak.es +# https://github.com/Madelena/Metrology-for-Hass + +# To add your own custom color, see the examples at the end of this file. + + +############################################ +############################################ +############################################ + +# BASE THEME + +________________________________________Common Base (Do Not Use): &common-colors + + # Text Colors + text-primary-color: var(--primary-text-color) + accent-text-color: "rgb(255,255,255)" + text-accent-color: var(--accent-text-color) + + # Main Interface Colors + divider-color: transparent + disabled-color: "rgba(255,255,255,.55)" + rgb-disabled-color: "128,128,128" + error-color: "#FF4400" + rgb-error-color: "255,64,0" + warning-color: "#ffa600" + rgb-warning-color: "255,166,0" + success-color: "#008a17" + rgb-success-color: "0,138,23" + info-color: "#039be5" + rgb-info-color: "3,155,229" + + # Main Interface Colors + lovelace-background: var(--primary-background-color) + ha-card-background: var(--card-background-color) + + app-header-background-color: "rgba(var(--rgb-primary-background-color),1)" + app-header-text-color: var(--primary-text-color) + app-header-selection-bar-color: var(--primary-color) + app-header-edit-background-color: rgb(var(--rgb-primary-color-darker)) + app-header-edit-text-color: var(--accent-text-color) + app-header-border-bottom: none + + # Material and Paper + light-theme-disabled-color: var(--disabled-color) + dark-theme-disabled-color: var(--disabled-color) + + material-disabled-color: var(--disabled-color) + material-divider-color: var(--divider-color) + + light-theme-base-color: var(--primary-color) + dark-theme-base-color: var(--primary-color) + + dark-primary-color: var(--primary-color) + light-primary-color: var(--primary-color) + + mdc-theme-primary: var(--accent-color) + mdc-theme-on-primary: var(--accent-text-color) + + # Borders + ha-card-border-width: 0px + ha-card-border-color: transparent + + # Typography + font-stack: &font-stack "Segoe UI Variable Static Text, Segoe UI, SegoeUI, -apple-system,BlinkMacSystemFont, system-ui, sans-serif" + display-font-stack: &display-font-stack "Segoe UI Variable Static Display, Segoe UI, SegoeUI, -apple-system,BlinkMacSystemFont, system-ui, sans-serif" + mdc-typography-button-font-family: var(--font-stack) + mdc-typography-font-family: var(--font-stack) + paper-font-common-base_-_font-family: var(--font-stack) + paper-font-title_-_font-family: var(--display-font-stack) + paper-font-headline_-_font-family: var(--display-font-stack) + paper-font-subhead_-_font-family: var(--display-font-stack) + paper-font-display1_-_font-family: var(--display-font-stack) + paper-font-display2_-_font-family: var(--display-font-stack) + paper-font-display3_-_font-family: var(--display-font-stack) + paper-font-display4_-_font-family: var(--display-font-stack) + + # Body at 14px = 10.5pt = 1rem + body-font-size: 1rem + body-font-weight: normal + body-line-height: normal + card-title-font-size: 1.5rem + card-title-font-weight: 600 + card-title-line-height: normal + title-font-size: 3.5rem + title-font-weight: 600 + title-line-height: normal + subtitle-font-size: 1rem + subtitle-font-weight: 600 + subtitle-line-height: normal + small-font-size: 0.9rem + + h1-font-size: 2.85rem + h2-font-size: 2.25rem + h3-font-size: 2rem + h4-font-size: 1.5rem + h5-font-size: 1.15rem + h6-font-size: .7rem + + h1-font-weight: 100 + h2-font-weight: 100 + h3-font-weight: 100 + h4-font-weight: 600 + h5-font-weight: 400 + h6-font-weight: 400 + + body-font: "var(--body-font-weight) var(--body-font-size) var(--font-stack)" + card-title-font: "var(--card-title-font-weight) var(--card-title-font-size) var(--display-font-stack)" + h1-font: "var(--h1-font-weight) var(--h1-font-size) var(--display-font-stack)" + h2-font: "var(--h2-font-weight) var(--h2-font-size) var(--display-font-stack)" + h3-font: "var(--h3-font-weight) var(--h3-font-size) var(--display-font-stack)" + h4-font: "var(--h4-font-weight) var(--h4-font-size) var(--display-font-stack)" + h5-font: "var(--h5-font-weight) var(--h5-font-size) var(--font-stack)" + h6-font: "var(--h6-font-weight) var(--h6-font-size) var(--font-stack)" + + ha-card-header-font-size: var(--card-title-font-size) + + paper-font-headline_-_font-size: 3.5rem + paper-font-headline_-_font-weight: 600 + paper-font-headline_-_letter-spacing: 0 + paper-font-headline_-_line-height: 1.4 + + paper-font-title_-_font-size: var(--card-title-font-size) + paper-font-title_-_font-weight: var(--card-title-font-weight) + paper-font-title_-_line-height: var(--card-title-line-height) + + material-small-font-size: 0.875rem + material-caption-font-size: 0.7rem + material-button-font-size: 1rem + + # Disabled this because without button borders, the buttons have bad affordance. + # mdc-typography-button-font-size: var(--body-font-size) + # mdc-typography-button-line-height: var(--body-line-height) + # mdc-typography-button-font-weight: var(--body-font-weight) + # mdc-typography-button-letter-spacing: 0 + # mdc-typography-button-text-decoration: none + # mdc-typography-button-text-transform: none + + mush-title-font-size: var(--title-font-size) + mush-title-font-weight: 600 + mush-title-padding: 24px 16px 16px + mush-subtitle-font-size: var(--subtitle-font-size) + mush-subtitle-font-weight: 600 + mush-card-primary-font-size: var(--body-font-size) + mush-card-secondary-font-size: var(--small-font-size) + mush-card-primary-font-weight: 600 + mush-card-secondary-font-weight: normal + mush-chip-font-size: var(--body-font-size) + mush-chip-font-weight: normal + + # Layout + masonry-view-card-margin: "2px 1px" + grid-card-gap: "2px" + stack-card-margin: "1px" + horizontal-stack-card-margin: "1px" + + mush-spacing: 16px + mush-icon-border-radius: 32px + + mdc-icon-size: 24px + header-height: 56px + + expansion-panel-summary-padding: 0 + expansion-panel-content-padding: 0 + + mush-badge-size: 16px + mush-badge-icon-size: 10px + mush-button-size: 32px + mush-button-icon-size: 20px + mush-shape-size: 48px + mush-shape-avatar-size: 48px + mush-shape-icon-size: 20px + #mush-shape-animation: + mush-slider-height: 16px + + + # Color Reset + # Map all the colors to the defaults above + + # Icons + state-icon-color: var(--primary-text-color) + state-icon-active-color: var(--primary-color) + state-icon-unavailable-color: var(--disabled-color) + + # Sidebar Menu + sidebar-text-color: var(--primary-text-color) + sidebar-selected-background-color: var(--primary-background-color) + sidebar-selected-icon-color: var(--primary-color) + sidebar-selected-text-color: var(--sidebar-selected-icon-color)) + + # Sliders + paper-slider-knob-color: var(--accent-color) + paper-slider-knob-start-color: var(--paper-slider-knob-color) + paper-slider-pin-color: var(--paper-slider-knob-color) + paper-slider-active-color: var(--paper-slider-knob-color) + paper-slider-secondary-color: rgb(var(--rgb-primary-color-darker)) + + # Labels + label-badge-background-color: var(--primary-background-color) + label-badge-text-color: var(--primary-text-color) + label-badge-red: "#BE3A3E" + label-badge-green: "#5CB861" + label-badge-blue: "#44A4CD" + label-badge-yellow: "#D5AE43" + label-badge-gray: "#5F6267" + + # Cards + paper-dialog-background-color: var(--card-background-color) + paper-listbox-background-color: var(--secondary-background-color) + paper-card-background-color: var(--card-background-color) + + # Switches + switch-checked-button-color: var(--primary-color) + switch-checked-track-color: var(--primary-text-color) + switch-unchecked-button-color: rgb(var(--rgb-primary-color-darker)) + switch-unchecked-track-color: var(--primary-text-color) + mdc-radio-unchecked-color: var(--primary-text-color) + + # Color Picker + ha-color-picker-wheel-borderwidth: 4 + ha-color-picker-wheel-bordercolor: var(--primary-text-color) + ha-color-picker-wheel-shadow: none + ha-color-picker-marker-borderwidth: 4 + ha-color-picker-marker-bordercolor: var(--accent-text-color) + + # Toggles + paper-toggle-button-checked-button-color: var(--switch-checked-button-color) + paper-toggle-button-checked-bar-color: var(--switch-checked-track-color) + paper-toggle-button-unchecked-button-color: var(--switch-unchecked-button-color) + paper-toggle-button-unchecked-bar-color: var(--switch-unchecked-track-color) + + # Table + table-row-background-color: var(--primary-background-color) + table-row-alternative-background-color: var(--secondary-background-color) + data-table-background-color: var(--primary-background-color) + + # Dropdowns + material-background-color: var(--secondary-background-color) + material-secondary-background-color: var(--primary-background-color) + mdc-text-field-idle-line-color: var(--secondary-text-color) + + # HACS + hacs-chip-background-color: var(--primary-color) + + # Code + markdown-code-background-color: var(--primary-background-color) + + # Checkboxes + mdc-select-fill-color: var(--primary-background-color) + mdc-select-ink-color: var(--primary-text-color) + mdc-select-label-ink-color: var(--secondary-text-color) + mdc-select-idle-line-color: var(--primary-text-color) + mdc-select-dropdown-icon-color: var(--secondary-text-color) + mdc-select-hover-line-color: var(--primary-color) + + # Input + input-fill-color: var(--primary-background-color) + input-disabled-fill-color: var(--disabled-color) + input-dropdown-icon-color: var(--secondary-text-color) + + input-ink-color: var(--primary-text-color) + input-label-ink-color: var(--secondary-text-color) + input-disabled-ink-color: var(--disabled-text-color) + + input-idle-line-color: var(--primary-text-color) + input-hover-line-color: var(--primary-color) + input-disabled-line-color: var(--disabled-text-color) + + input-outlined-idle-border-color: none + input-outlined-hover-border-color: none + input-outlined-disabled-border-color: var(--disabled-text-color) + + code-editor-background-color: var(--primary-background-color) + mdc-text-field-fill-color: var(--primary-background-color) + + # Buttons + btn-bg-color-off: var(--primary-background-color) + mdc-button-disabled-fill-color: var(--disabled-color) + mdc-button-disabled-ink-color: var(--disabled-text-color) + # mdc-button-raised-box-shadow: + + # Home Assistant override + ha-card-box-shadow: "none" + + # Mushroom + mush-rgb-pink: var(--rgb-primary-color) + mush-rgb-state-entity: var(--rgb-pink) + + # Swiper + swiper-theme-color: var(--primary-color) + + # Video + video-max-height: none + + # States + rgb-state-default-color: var(--rgb-accent-color) + rgb-state-inactive-color: var(--rgb-secondary-background-color) + rgb-state-unavailable-color: var(--rgb-disabled-text-color) + rgb-state-alarm-armed-color: var(--rgb-success-color) + rgb-state-alarm-arming-color: var(--rgb-warning-color) + rgb-state-alarm-disarmed-color: var(--rgb-secondary-background-color) + rgb-state-alarm-pending-color: var(--rgb-warning-color) + rgb-state-alarm-triggered-color: var(--rgb-error-color) + rgb-state-alert-color: var(--rgb-error-color) + rgb-state-automation-color: var(--rgb-primary-color) + rgb-state-binary-sensor-alerting-color: var(--rgb-error-color) + rgb-state-binary-sensor-color: var(--rgb-primary-color) + rgb-state-calendar-color: var(--rgb-primary-color) + rgb-state-camera-color: var(--rgb-primary-color) + rgb-state-climate-auto-color: var(--rgb-success-color) + rgb-state-climate-cool-color: var(--rgb-blue-color) + rgb-state-climate-dry-color: var(--rgb-warning-color) + rgb-state-climate-fan-only-color: var(--rgb-cyan-color) + rgb-state-climate-heat-color: var(--rgb-deep-orange-color) + rgb-state-climate-heat-cool-color: var(--rgb-primary-color) + rgb-state-climate-idle-color: var(--rgb-secondary-background-color) + rgb-state-cover-color: var(--rgb-purple-color) + rgb-state-fan-color: var(--rgb-cyan-color) + rgb-state-group-color: var(--rgb-primary-color) + rgb-state-humidifier-color: var(--rgb-blue-color) + rgb-state-input-boolean-color: var(--rgb-primary-color) + rgb-state-light-color: var(--rgb-primary-color) + rgb-state-lock-jammed-color: var(--rgb-error-color) + rgb-state-lock-locked-color: var(--rgb-success-color) + rgb-state-lock-pending-color: var(--rgb-warning-color) + rgb-state-lock-unlocked-color: var(--rgb-error-color) + rgb-state-media-player-color: var(--rgb-primary-color) + rgb-state-person-home-color: var(--rgb-success-color) + rgb-state-person-not-home-color: var(--rgb-secondary-background-color) + rgb-state-person-zone-color: var(--rgb-warning-color) + rgb-state-remote-color: var(--rgb-primary-color) + rgb-state-script-color: var(--rgb-primary-color) + rgb-state-sensor-battery-high-color: var(--rgb-success-color) + rgb-state-sensor-battery-low-color: var(--rgb-error-color) + rgb-state-sensor-battery-medium-color: var(--rgb-warning-color) + rgb-state-siren-color: var(--rgb-error-color) + rgb-state-sun-day-color: var(--rgb-primary-color) + rgb-state-sun-night-color: var(--rgb-secondary-background-color) + rgb-state-switch-color: var(--rgb-primary-color) + rgb-state-timer-color: var(--rgb-primary-color) + rgb-state-update-color: var(--rgb-success-color) + rgb-state-update-installing-color: var(--rgb-warning-color) + rgb-state-vacuum-color: var(--rgb-primary-color) + +________________________________________Common Base 2 (Do Not Use): + + modes: + dark: &common-dark + <<: *common-colors + + # Background Colors + mdc-ripple-color: "#AAAAAA" + rgb-mdc-ripple-color: "170,170,170" + + # Text Colors + primary-text-color: "rgb(255,255,255)" + rgb-primary-text-color: "255,255,255" + secondary-text-color: "rgba(255,255,255,.75)" + rgb-secondary-text-color: "192,192,192" + disabled-text-color: "rgba(255,255,255,.55)" + rgb-disabled-text-color: "140,140,140" + + # Other Mode Specific Variables + mdc-dialog-scrim-color: "rgba(0, 0, 0, 0.5)" + dialog-backdrop-filter: none + dialog-box-shadow: var(--rgb-accent-color) + slider-thumb-color: "#121212" + + sidebar-icon-color: var(--secondary-text-color) + sidebar-background-color: var(--secondary-background-color) + + # Custom + dark-mode-filter: "invert(1) hue-rotate(.5turn)" + + light: &common-light + <<: *common-colors + + # Background Colors + mdc-ripple-color: "#222222" + rgb-mdc-ripple-color: "32,32,32" + + # Text Colors + primary-text-color: "rgba(0,0,0,.95)" + rgb-primary-text-color: "0,0,0" + secondary-text-color: "rgba(0,0,0,.66)" + rgb-secondary-text-color: "84,84,84" + disabled-text-color: "rgba(0,0,0,.6)" + rgb-disabled-text-color: "152,152,152" + + # Other Mode Specific Variables + mdc-dialog-scrim-color: rgba(var(--rgb-primary-background-color),.667) + dialog-backdrop-filter: none + dialog-box-shadow: var(--rgb-primary-text-color) + slider-thumb-color: "#E8E8E8" + + sidebar-icon-color: rgba(0,0,0,.5) + sidebar-background-color: var(--primary-background-color) + + # Custom + dark-mode-filter: "invert(0)" + + +############################################ +############################################ +############################################ + + +________________________________________Common Base 3 (Do Not Use): &common-card-mods + + # Card Mod + card-mod-row-yaml: &card-mod-row | + .: | + hui-generic-entity-row { + padding-top: 4px; + padding-bottom: 4px; + } + .info, .info > * { + white-space: normal !important; + } + .secondary { + font-size: var(--small-font-size); + line-height: 1.4; + } + .state, .entity div { + font-size: var(--h5-font-size); + font-weight: 400; + } + hui-generic-entity-row$: | + .info, .info > * { + white-space: normal !important; + } + .secondary { + font-size: var(--small-font-size); + line-height: 1.4; + } + .state, .entity div { + font-size: var(--h5-font-size); + font-weight: 400; + } + + card-mod-card-yaml: &card-mod-card | + .: | + ha-card { + --mdc-icon-size: 20px + } + ha-card .value { + font-size: var(--h1-font-size); + font-weight: var(--h1-font-weight); + margin-right: 0; + } + ha-card .name { + font-size: var(--body-font-size); + line-height: var(--body-line-height); + font-weight: var(--body-font-weight); + color: var(--primary-text-color); + } + ha-card .info { + line-height: 32px; + padding-top: 8px; + } + ha-card .header { + padding-top: 16px !important; + } + .icon { + line-height: 16px !important; + } + ha-card .measurement { + font-size: var(--h6-font-size); + font-weight: 700; + color: var(--secondary-text-color); + text-transform: uppercase; + } + .card-header, .card-header .name, :host ::slotted(.card-header), ha-card.type-area .name, ha-card.type-picture-entity .footer.single, ha-card.type-media-control hui-marquee { + font-size: var(--card-title-font-size) !important; + line-height: var(--card-title-line-height) !important; + font-weight: var(--card-title-font-weight) !important; + letter-spacing: 0; + } + .card-header, :host ::slotted(.card-header) { + margin-bottom: 8px; + padding: 12px 16px; + } + :host ::slotted(.card-content:not(:first-child)), slot:not(:first-child)::slotted(.card-content) { + margin-top: 0; + } + .entities { + align-items: flex-start !important; + } + + card-mod-glance-yaml: &card-mod-glance | + .: | + state-badge { + --mdc-icon-size: 32px; + order: 0; + } + div.name { + font-size: var(--body-font-size); + color: var(--primary-font-color); + order: 1 !important; + } + div { + order: 2; + font-size: var(--small-font-size); + color: var(--secondary-text-color); + line-height: 1.33; + white-space: unset !important; + } + + card-mod-more-info-yaml: &card-mod-more-info-yaml | + $: | + @supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) { + .mdc-dialog__surface { + backdrop-filter: blur(16px); + -webkit-backdrop-filter: blur(16px); + background-color: rgba(var(--rgb-mdc-theme-surface), .5) !important; + } + } + .mdc-dialog .mdc-dialog__container .mdc-dialog__surface, + .mdc-dialog .mdc-dialog__content { + overflow: visible; + } + .mdc-dialog__surface { + box-shadow: 0 0px 16px 4px rgba(var(--dialog-box-shadow), .15), 0 16px 64px 32px rgba(var(--dialog-box-shadow), .5) !important; + } + ha-header-bar$: | + .mdc-top-app-bar { + background: none !important; + } + .: | + .mdc-top-app-bar__title, .main-title { + text-transform: uppercase; + font-size: var(--body-font-size); + font-weight: 600; + line-height: 1.1; + overflow: inherit; + white-space: normal; + margin-left: -6px; + } + .content { + xmargin-top: -8px; + } + ha-more-info-info$state-card-display$: | + .state { + margin-left: 46px !important; + font-size: var(--h1-font-size); + font-weight: var(--h1-font-weight); + text-align: left !important; + line-height: 1.1; + } + .layout.horizontal { + flex-direction: column-reverse !important; + } + state-info { margin-left: -8px; margin-top: -42px; } + ha-more-info-info$state-card-display$state-info$: | + .name { display: none; } + .time-ago { margin-top: 42px; + font-size: var(--h6-font-size); + text-transform: uppercase;} + state-badge { + width: 32px !important; + height: 32px !important; + border-radius: 0 !important; + margin: 4px 8px 8px 8px; + } + state-badge[icon] { + margin: 0 0 0 8px !important; + } + ha-more-info-info$more-info-default$ha-attributes$: | + .data-entry { flex-direction: column !important; } + .key { + font-size: var(--h6-font-size); + text-transform: uppercase; + line-height: 1.1; + } + .data-entry .value { + text-align: left !important; + font-size: var(--h2-font-size); + font-weight: var(--h2-font-weight); + line-height: 1.1; + margin-bottom: 16px; + max-width: none !important; + } + .data-entry:last-child .value { + margin-bottom: 0; + } + ha-more-info-history$state-history-charts: + $: + state-history-chart-timeline$: | + .chartTooltip { + margin-top: -200px; + } + ha-more-info-info: + $: + ha-more-info-history: + $: | + state-history-charts, statistics-chart { + filter: hue-rotate(calc(var(--hue-primary-color) - 212deg)) saturate(3) brightness(0.66) + } + + card-mod-root-yaml: &card-mod-root | + .: | + @supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) { + app-header, app-toolbar { + background-color: "rgba(var(--rgb-primary-background-color),.33)" + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + } + } + app-toolbar [main-title] { + font-size: var(--h5-font-size); + line-height: 1.1; + font-weight: var(--h5-font-weight); + text-transform: uppercase; + margin-left: 8px !important; + } + app-header$: | + :host::before { + box-shadow: inset 0px 4px 6px -4px rgb(0 0 0 / 10%) !important; + } + ha-app-layout$app-header$app-toolbar$ha-tabs$: | + .iron-selected paper-tab { + + } + + card-mod-sidebar: &card-mod-sidebar | + .menu .title { + font-weight: 600; + } + :host([expanded]) paper-icon-item { + width: 100%; + } + .iron-selected paper-icon-item { + border-left: 3px solid var(--accent-color) !important; + border-radius: var(--ha-card-border-radius) !important; + padding-left: 9px !important; + } + .profile.iron-selected paper-icon-item { + padding-left: 1px !important; + } + paper-icon-item span { + font-weight: normal !important; + } + + card-mod-view: &card-mod-view | + .main-title { + font-size: 10pt; + font-weight: 600; + text-transform: uppercase; + } + #tabbar { + font-size: 10pt; + text-transform: uppercase; + font-weight: 600; + } + #tabbar:not(.bottom-bar) { + justify-content: left; + } + + +# Base Metro Theme + +________________________________________Common Base 4 (Do Not Use): + + modes: + dark: &metro-common-dark + <<: *common-dark + primary-background-color: "rgb(0,0,0)" + rgb-primary-background-color: "0,0,0" + secondary-background-color: "rgb(24,24,24)" + rgb-secondary-background-color: "24,24,24" + card-background-color: "rgb(19,19,19)" + rgb-card-background-color: "19,19,19" + + ha-card-border-radius: 0 + ha-config-card-border-radius: 0 + ha-dialog-border-radius: 0 + vertical-stack-card-margin: "1px 0px 1px 0px" + mush-control-border-radius: 0px + mdc-shape-small: 0 + + mdc-button-raised-box-shadow: none + mdc-button-raised-box-shadow-hover: none + + mdc-theme-surface: "rgb(24,24,24)" + rgb-mdc-theme-surface: "24,24,24" + + light: &metro-common-light + <<: *common-light + primary-background-color: "rgb(255,255,255)" + rgb-primary-background-color: "255,255,255" + secondary-background-color: "rgb(232,232,232)" + rgb-secondary-background-color: "232,232,232" + card-background-color: "rgba(247,247,247)" + rgb-card-background-color: "247,247,247" + + ha-card-border-radius: 0 + ha-config-card-border-radius: 0 + ha-dialog-border-radius: 0 + vertical-stack-card-margin: "1px 0px 1px 0px" + mush-control-border-radius: 0px + mdc-shape-small: 0 + + mdc-button-raised-box-shadow: none + mdc-button-raised-box-shadow-hover: none + + mdc-theme-surface: var(--primary-background-color) + rgb-mdc-theme-surface: var(--rgb-primary-background-color) + + + +# Base Fluent Theme + +________________________________________Common Base 5 (Do Not Use): + + modes: + dark: &fluent-common-dark + <<: *common-dark + ha-card-border-radius: "4px" + ha-config-card-border-radius: "4px" + ha-dialog-border-radius: "8px" + vertical-stack-card-margin: "1px 0px 1px 0px" + mush-control-border-radius: 4px + mdc-shape-small: 4px + + mdc-theme-surface: var(--primary-background-color) + rgb-mdc-theme-surface: var(--rgb-primary-background-color) + + light: &fluent-common-light + <<: *common-light + primary-background-color: "rgb(255,255,255)" + rgb-primary-background-color: "255,255,255" + + ha-card-border-radius: "4px" + ha-config-card-border-radius: "4px" + ha-dialog-border-radius: "8px" + vertical-stack-card-margin: "1px 0px 1px 0px" + mush-control-border-radius: 4px + mdc-shape-small: 4px + + mdc-theme-surface: var(--card-background-color) + rgb-mdc-theme-surface: var(--rgb-card-background-color) + + + +############################################ +############################################ +############################################ + +# Color Variations + +# So happy that YAML Anchors work so I don't need to duplicate code a billion times. +# It's relatively easy to create your own theme. You just need to provide the colors. + + +Metro Red: + <<: *common-card-mods + card-mod-theme: "Metro Red" + + primary-color: "#C30052" + rgb-primary-color: "195,0,82" + rgb-primary-color-darker: "144, 0, 60" + rgb-primary-color-lighter: "233, 0, 98" + hue-primary-color: "335deg" + + accent-color: "#e90062" + rgb-accent-color: "233, 0, 98" + + modes: + dark: + <<: *metro-common-dark + light: + <<: *metro-common-light + +Fluent Red: + <<: *common-card-mods + card-mod-theme: "Fluent Red" + + primary-color: "#C30052" + rgb-primary-color: "195,0,82" + rgb-primary-color-darker: "144, 0, 60" + rgb-primary-color-lighter: "233, 0, 98" + hue-primary-color: "335deg" + + accent-color: "#e90062" + rgb-accent-color: "233, 0, 98" + + modes: + dark: + <<: *fluent-common-dark + primary-background-color: "rgb(27,24,25)" + rgb-primary-background-color: "27,24,25" + secondary-background-color: "rgb(67,61,63)" + rgb-secondary-background-color: "67,61,63" + card-background-color: "rgb(40,36,38)" + rgb-card-background-color: "40,36,38" + + light: + <<: *fluent-common-light + secondary-background-color: "rgb(249,210,226)" + rgb-secondary-background-color: "249,210,226" + card-background-color: "rgb(245,239,242)" + rgb-card-background-color: "245,239,242" + + + +Metro Blue: + <<: *common-card-mods + card-mod-theme: "Metro Blue" + + primary-color: "#0078d7" + rgb-primary-color: "0,120,215" + rgb-primary-color-darker: "0,91,163" + rgb-primary-color-lighter: "0,141,253" + hue-primary-color: "207deg" + + accent-color: "#008dfd" + rgb-accent-color: "0,141,253" + + modes: + dark: + <<: *metro-common-dark + light: + <<: *metro-common-light + +Fluent Blue: + <<: *common-card-mods + card-mod-theme: "Fluent Blue" + + primary-color: "#0078d7" + rgb-primary-color: "0,120,215" + rgb-primary-color-darker: "0,91,163" + rgb-primary-color-lighter: "0,141,253" + hue-primary-color: "207deg" + + accent-color: "#008dfd" + rgb-accent-color: "0,141,253" + + modes: + dark: + <<: *fluent-common-dark + primary-background-color: "rgb(24,26,27)" + rgb-primary-background-color: "24,26,27" + secondary-background-color: "rgb(57,64,70)" + rgb-secondary-background-color: "57,64,70" + card-background-color: "rgb(36,38,40)" + rgb-card-background-color: "36,38,40" + + light: + <<: *fluent-common-light + secondary-background-color: "rgb(210,231,249)" + rgb-secondary-background-color: "210,231,249" + card-background-color: "rgb(239,243,245)" + rgb-card-background-color: "239,243,245" + + + +Metro Green: + <<: *common-card-mods + card-mod-theme: "Metro Green" + + primary-color: "#00cb6a" + rgb-primary-color: "0, 203, 106" + rgb-primary-color-darker: "0, 151, 79" + rgb-primary-color-lighter: "0, 241, 125" + hue-primary-color: "151deg" + + accent-color: "#00f17d" + rgb-accent-color: "0, 241, 125" + + modes: + dark: + <<: *metro-common-dark + light: + <<: *metro-common-light + +Fluent Green: + <<: *common-card-mods + card-mod-theme: "Fluent Green" + + primary-color: "#00cb6a" + rgb-primary-color: "0, 203, 106" + rgb-primary-color-darker: "0, 151, 79" + rgb-primary-color-lighter: "0, 241, 125" + hue-primary-color: "151deg" + + accent-color: "#00f17d" + rgb-accent-color: "0, 241, 125" + + modes: + dark: + <<: *fluent-common-dark + primary-background-color: "rgb(24,27,26)" + rgb-primary-background-color: "24,27,26" + secondary-background-color: "rgb(57,70,64)" + rgb-secondary-background-color: "57,70,64" + card-background-color: "rgb(36,40,38)" + rgb-card-background-color: "36,40,38" + + light: + <<: *fluent-common-light + secondary-background-color: "rgb(210,249,231)" + rgb-secondary-background-color: "210,249,231" + card-background-color: "rgb(239,245,243)" + rgb-card-background-color: "239,245,243" + + + +Metro Orange: + <<: *common-card-mods + card-mod-theme: "Metro Orange" + + primary-color: "#ff8c00" + rgb-primary-color: "255, 140, 0" + rgb-primary-color-darker: "204, 112, 0" + rgb-primary-color-lighter: "255, 157, 0" + hue-primary-color: "33deg" + + accent-color: "#ff9d00" + rgb-accent-color: "255, 157, 0" + + modes: + dark: + <<: *metro-common-dark + light: + <<: *metro-common-light + +Fluent Orange: + <<: *common-card-mods + card-mod-theme: "Fluent Orange" + + primary-color: "#ff8c00" + rgb-primary-color: "255, 140, 0" + rgb-primary-color-darker: "204, 112, 0" + rgb-primary-color-lighter: "255, 157, 0" + hue-primary-color: "33deg" + + accent-color: "#ff9d00" + rgb-accent-color: "255, 157, 0" + + modes: + dark: + <<: *fluent-common-dark + primary-background-color: "rgb(27,26,24)" + rgb-primary-background-color: "27,26,24" + secondary-background-color: "rgb(70,64,57)" + rgb-secondary-background-color: "70,64,57" + card-background-color: "rgb(40,38,36)" + rgb-card-background-color: "40,38,36" + + light: + <<: *fluent-common-light + secondary-background-color: "rgb(249,231,210)" + rgb-secondary-background-color: "249,231,210" + card-background-color: "rgb(245,243,239)" + rgb-card-background-color: "245,243,239" + + + +Metro Purple: + <<: *common-card-mods + card-mod-theme: "Metro Purple" + + primary-color: "#6a00cb" + rgb-primary-color: "106, 0, 203" # hsl(hue,100,42) + rgb-primary-color-darker: "105, 0, 204" # hsl(hue,100,32) + rgb-primary-color-lighter: "169, 77, 255" # hsl(hue,100,50) + hue-primary-color: "271deg" + + accent-color: "#A94DFF" + rgb-accent-color: "169, 77, 255" + + modes: + dark: + <<: *metro-common-dark + light: + <<: *metro-common-light + +Fluent Purple: + <<: *common-card-mods + card-mod-theme: "Fluent Purple" + + primary-color: "#6a00cb" + rgb-primary-color: "106, 0, 203" # hsl(hue,100,42) + rgb-primary-color-darker: "105, 0, 204" # hsl(hue,100,32) + rgb-primary-color-lighter: "169, 77, 255" # hsl(hue,100,50) + hue-primary-color: "271deg" + + accent-color: "#A94DFF" + rgb-accent-color: "169, 77, 255" + + modes: + dark: + <<: *fluent-common-dark + primary-background-color: "rgb(26,24,27)" # hsl(hue,5,10) + rgb-primary-background-color: "26,24,27" + secondary-background-color: "rgb(64,57,70)" # hsl(hue,10,25) + rgb-secondary-background-color: "64,57,70" + card-background-color: "rgb(38,36,40)" # hsl(hue,5,15) + rgb-card-background-color: "38,36,40" + + light: + <<: *fluent-common-light + secondary-background-color: "rgb(230,210,249)" # hsl(hue,75,90) + rgb-secondary-background-color: "230,210,249" + card-background-color: "rgb(242,239,245)" # hsl(hue,25,95) + rgb-card-background-color: "242,239,245" + + + +# Use the following as the template for your custom color theme. + +Metro Slate: + <<: *common-card-mods + card-mod-theme: "Metro Slate" + + primary-color: "#4f5a68" + rgb-primary-color: "79,90,104" + rgb-primary-color-darker: "57,65,76" + rgb-primary-color-lighter: "101,115,134" + hue-primary-color: "214deg" + + accent-color: "#677385" + rgb-accent-color: "101,115,134" + + modes: + dark: + <<: *metro-common-dark + light: + <<: *metro-common-light + + +Fluent Slate: + <<: *common-card-mods + card-mod-theme: "Fluent Slate" + + primary-color: "#4f5a68" + rgb-primary-color: "79,90,104" + rgb-primary-color-darker: "57,65,76" + rgb-primary-color-lighter: "101,115,134" + hue-primary-color: "214deg" + + accent-color: "#677385" + rgb-accent-color: "101,115,134" + + modes: + dark: + <<: *fluent-common-dark + primary-background-color: "rgb(24,25,27)" + rgb-primary-background-color: "24,25,27" + secondary-background-color: "rgb(57,63,70)" + rgb-secondary-background-color: "57,63,70" + card-background-color: "rgb(36,38,40)" + rgb-card-background-color: "36,38,40" + + light: + <<: *fluent-common-light + secondary-background-color: "rgb(223,229,236)" + rgb-secondary-background-color: "223,229,236" + card-background-color: "rgb(240,242,244)" + rgb-card-background-color: "240,242,244" + + + +# Paste your custom color themes here. diff --git a/themes/mushroom/mushroom-shadow.yaml b/themes/mushroom/mushroom-shadow.yaml new file mode 100644 index 0000000..0741410 --- /dev/null +++ b/themes/mushroom/mushroom-shadow.yaml @@ -0,0 +1,11 @@ +# DO NOT EDIT THIS FILE. +# This file will be reset with updates. +# If you want to customize it, copy the content in another folder and file and change the name. +# https://www.home-assistant.io/integrations/frontend/#defining-themes +Mushroom Shadow: + # Home Assistant override + ha-card-box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.16) + ha-card-border-width: 0 + modes: + light: {} + dark: {} diff --git a/themes/mushroom/mushroom-square-shadow.yaml b/themes/mushroom/mushroom-square-shadow.yaml new file mode 100644 index 0000000..acd8fe4 --- /dev/null +++ b/themes/mushroom/mushroom-square-shadow.yaml @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE. +# This file will be reset with updates. +# If you want to customize it, copy the content in another folder and file and change the name. +# https://www.home-assistant.io/integrations/frontend/#defining-themes +Mushroom Square Shadow: + # Home Assistant override + ha-badge-border-radius: 6px + ha-card-box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.16) + ha-card-border-width: 0 + ha-card-border-radius: 6px + ha-card-features-border-radius: 6px + ha-tile-icon-border-radius: 6px + # Layout + mush-spacing: 8px + # Elements + mush-icon-border-radius: 6px + mush-control-border-radius: 6px + # Chips + mush-chip-border-radius: 6px + modes: + light: {} + dark: {} diff --git a/themes/mushroom/mushroom-square.yaml b/themes/mushroom/mushroom-square.yaml new file mode 100644 index 0000000..8736364 --- /dev/null +++ b/themes/mushroom/mushroom-square.yaml @@ -0,0 +1,20 @@ +# DO NOT EDIT THIS FILE. +# This file will be reset with updates. +# If you want to customize it, copy the content in another folder and file and change the name. +# https://www.home-assistant.io/integrations/frontend/#defining-themes +Mushroom Square: + # Home Assistant override + ha-badge-border-radius: 6px + ha-card-border-radius: 6px + ha-card-features-border-radius: 6px + ha-tile-icon-border-radius: 6px + # Layout + mush-spacing: 8px + # Elements + mush-icon-border-radius: 6px + mush-control-border-radius: 6px + # Chips + mush-chip-border-radius: 6px + modes: + light: {} + dark: {} diff --git a/themes/mushroom/mushroom.yaml b/themes/mushroom/mushroom.yaml new file mode 100644 index 0000000..dfffc72 --- /dev/null +++ b/themes/mushroom/mushroom.yaml @@ -0,0 +1,9 @@ +# DO NOT EDIT THIS FILE. +# This file will be reset with updates. +# If you want to customize it, copy the content in another folder and file and change the name. +# https://www.home-assistant.io/integrations/frontend/#defining-themes +Mushroom: + # Nothing here as it's the default HA theme since 2022.11 + modes: + light: {} + dark: {}