diff --git a/automations/house/all_away_media_off.yaml b/automations/house/all_away_media_off.yaml index 4100de4..ce86629 100644 --- a/automations/house/all_away_media_off.yaml +++ b/automations/house/all_away_media_off.yaml @@ -25,10 +25,10 @@ condition: entity_id: media_player.front_room_hub state: "playing" - condition: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.girls_room_clock state: "playing" - condition: state - entity_id: media_player.girls_room_hub + entity_id: media_player.bedroom_hub state: "playing" - condition: state entity_id: media_player.bathroom_mini diff --git a/automations/people/Clint/Clint_in_bed.yaml b/automations/people/Clint/Clint_in_bed.yaml index ba4d962..7ed45ba 100644 --- a/automations/people/Clint/Clint_in_bed.yaml +++ b/automations/people/Clint/Clint_in_bed.yaml @@ -7,12 +7,16 @@ trigger: - platform: state entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either to: "on" + # Bed in master bedroom is occupied + - platform: state + entity_id: input_boolean.master_bed_occupied + to: "on" # Radio playing - platform: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub to: "playing" - platform: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub to: "idle" # Light on - platform: state diff --git a/automations/people/Clint/Clint_up.yaml b/automations/people/Clint/Clint_up.yaml index ae9823f..156209c 100644 --- a/automations/people/Clint/Clint_up.yaml +++ b/automations/people/Clint/Clint_up.yaml @@ -13,6 +13,10 @@ trigger: entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right to: "off" for: "00:05:00" + # Bed in master bedroom is occupied + - platform: state + entity_id: input_boolean.master_bed_occupied + to: "on" - platform: state entity_id: - binary_sensor.master_bedroom_door_contact diff --git a/automations/people/Clint/Clint_wakeup.yaml b/automations/people/Clint/Clint_wakeup.yaml index 7c9f025..7e51021 100644 --- a/automations/people/Clint/Clint_wakeup.yaml +++ b/automations/people/Clint/Clint_wakeup.yaml @@ -10,6 +10,10 @@ trigger: - platform: state entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right to: "on" + # Bed in master bedroom is occupied + - platform: state + entity_id: input_boolean.master_bed_occupied + to: "on" condition: - condition: state diff --git a/automations/people/Clint/wake_clint.yaml b/automations/people/Clint/wake_clint.yaml index 351996e..237ec3a 100644 --- a/automations/people/Clint/wake_clint.yaml +++ b/automations/people/Clint/wake_clint.yaml @@ -28,7 +28,7 @@ action: - action: media_player.volume_set data: #entity_id: media_player.ma_home_assistant_voice_097b44_media_player - entity_id: media_player.ma_master_bedroom_clock + entity_id: media_player.ma_bedroom_hub volume_level: 0.90 - action: input_select.select_option @@ -40,7 +40,7 @@ action: - action: music_assistant.play_media target: #entity_id: media_player.ma_home_assistant_voice_097b44_media_player - entity_id: media_player.ma_master_bedroom_clock + entity_id: media_player.ma_bedroom_hub data: media_type: playlist #media_id: library://playlist/7 diff --git a/automations/people/Kristy/kristy_in_bed.yaml b/automations/people/Kristy/kristy_in_bed.yaml index ffb9304..b7671e0 100644 --- a/automations/people/Kristy/kristy_in_bed.yaml +++ b/automations/people/Kristy/kristy_in_bed.yaml @@ -8,10 +8,10 @@ trigger: to: "on" # Radio playing - platform: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub to: "playing" - platform: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub to: "idle" # Light on - platform: state diff --git a/automations/people/almost_bedtime_tts.yaml b/automations/people/almost_bedtime_tts.yaml index 674626a..d9a2363 100644 --- a/automations/people/almost_bedtime_tts.yaml +++ b/automations/people/almost_bedtime_tts.yaml @@ -29,8 +29,8 @@ action: - media_player.bathroom_mini - media_player.front_room_hub - media_player.kitchen - - media_player.girls_room_hub - - media_player.master_bedroom_clock + - media_player.girls_room_clock + - media_player.bedroom_hub volume_level: 0.7 - delay: "00:00:03" - action: tts.speak diff --git a/automations/people/continue_nursery_noise.yaml b/automations/people/continue_nursery_noise.yaml index ffcf5f1..9e72a1c 100644 --- a/automations/people/continue_nursery_noise.yaml +++ b/automations/people/continue_nursery_noise.yaml @@ -2,7 +2,7 @@ alias: Continue Girls Room Noise id: automation_continue_girls_room_noise trigger: - platform: state - entity_id: media_player.girls_room_hub + entity_id: media_player.girls_room_clock from: "playing" condition: - condition: state diff --git a/automations/people/kids_away_videos_on.yaml b/automations/people/kids_away_videos_on.yaml index 84a2619..a8f1fee 100644 --- a/automations/people/kids_away_videos_on.yaml +++ b/automations/people/kids_away_videos_on.yaml @@ -35,11 +35,11 @@ condition: attribute: source state: "YouTube" - condition: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub attribute: source state: "PBS Kids" - condition: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub attribute: source state: "YouTube" @@ -94,23 +94,23 @@ action: - choose: - conditions: - condition: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub state: "playing" - condition: or conditions: - condition: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub attribute: source state: "YouTube" - condition: state - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub attribute: source state: "PBS Kids" sequence: - action: media_player.select_source data: - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub source: Home - action: media_player.turn_off data: - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub diff --git a/automations/rooms/computer_area/computer_area_occupied.yaml b/automations/rooms/computer_area/computer_area_occupied.yaml deleted file mode 100644 index 71d1341..0000000 --- a/automations/rooms/computer_area/computer_area_occupied.yaml +++ /dev/null @@ -1,33 +0,0 @@ -alias: "Computer Area Occupied" -id: automation_computer_area_occupied -mode: restart - -trigger: - - platform: state - entity_id: - - binary_sensor.computer_area_occupied - to: "on" -condition: - # Computer area was not already occupied or computer area light is off while not set to manual or off - - condition: or - conditions: - - condition: state - entity_id: input_boolean.computer_area_occupied - state: "off" - - condition: and - conditions: - - condition: state - entity_id: light.computer_area_hue - state: "off" - - condition: not - conditions: - - condition: state - entity_id: input_select.computer_area_mode - state: "Off" - - condition: state - entity_id: input_select.computer_area_mode - state: "Manual" - -action: - - action: input_boolean.turn_on - entity_id: input_boolean.computer_area_occupied diff --git a/automations/rooms/furnace_room/furnace_room_water_sensor_on.yaml b/automations/rooms/furnace_room/furnace_room_water_sensor_on.yaml index 5042241..c197661 100644 --- a/automations/rooms/furnace_room/furnace_room_water_sensor_on.yaml +++ b/automations/rooms/furnace_room/furnace_room_water_sensor_on.yaml @@ -12,7 +12,7 @@ action: target: entity_id: tts.google_translate_en_com data: - media_player_entity_id: media_player.front_room_hub, media_player.bathroom_mini, media_player.kitchen, media_player.master_bedroom_clock + media_player_entity_id: media_player.front_room_hub, media_player.bathroom_mini, media_player.kitchen, media_player.bedroom_hub message: Attention! A water leak has been detected on the furnace room floor! - action: notify.mobile_app_pixel_7 diff --git a/automations/rooms/girls_room/girls_room_bedtime_button.yaml b/automations/rooms/girls_room/girls_room_bedtime_button.yaml index 4cb566f..1dc408c 100644 --- a/automations/rooms/girls_room/girls_room_bedtime_button.yaml +++ b/automations/rooms/girls_room/girls_room_bedtime_button.yaml @@ -31,27 +31,27 @@ action: condition: and conditions: - condition: state - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock state: "playing" - action: media_player.volume_set data: volume_level: 0.4 target: - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock #- action: script.goodnight_kids_youtube_music - action: media_player.shuffle_set data: shuffle: false target: - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock - action: media_player.repeat_set data: repeat: all target: - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock - action: music_assistant.play_media data: @@ -59,4 +59,4 @@ action: media_type: playlist enqueue: replace target: - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock diff --git a/automations/rooms/girls_room/girls_room_lights_to_on.yaml b/automations/rooms/girls_room/girls_room_lights_to_on.yaml index d25c325..c10d9ac 100644 --- a/automations/rooms/girls_room/girls_room_lights_to_on.yaml +++ b/automations/rooms/girls_room/girls_room_lights_to_on.yaml @@ -89,7 +89,7 @@ action: sequence: - action: light.turn_on target: - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue - alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition" conditions: @@ -99,7 +99,7 @@ action: state: Auto - alias: "Lights are on" condition: state - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue state: "on" - alias: "Automatic light profile set to Nightlight" condition: state @@ -120,7 +120,7 @@ action: state: Auto - alias: "Lights are on" condition: state - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue state: "on" sequence: - action: scene.turn_on @@ -137,7 +137,7 @@ action: state: Auto - alias: "Lights are off" condition: state - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue state: "off" sequence: - action: scene.turn_on @@ -148,7 +148,7 @@ action: conditions: - alias: "Room not manual or auto and lights are on" condition: state - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue state: "on" - alias: "Room set to Nightlight" condition: state @@ -165,7 +165,7 @@ action: conditions: - alias: "Room not manual or auto and lights are on" condition: state - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue state: "on" sequence: - action: scene.turn_on @@ -178,7 +178,7 @@ action: conditions: - alias: "Room not manual or auto and lights are off" condition: state - entity_id: light.girls_room_fan_light_switch_light + entity_id: light.girls_room_hue state: "off" sequence: - action: scene.turn_on diff --git a/automations/rooms/girls_room/girls_room_white_noise_off.yaml b/automations/rooms/girls_room/girls_room_white_noise_off.yaml index a5c2745..4a2a0a2 100644 --- a/automations/rooms/girls_room/girls_room_white_noise_off.yaml +++ b/automations/rooms/girls_room/girls_room_white_noise_off.yaml @@ -8,4 +8,4 @@ trigger: action: - action: media_player.turn_off - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock diff --git a/automations/rooms/girls_room/girls_room_white_noise_on.yaml b/automations/rooms/girls_room/girls_room_white_noise_on.yaml index d769db8..7db8a04 100644 --- a/automations/rooms/girls_room/girls_room_white_noise_on.yaml +++ b/automations/rooms/girls_room/girls_room_white_noise_on.yaml @@ -7,7 +7,7 @@ trigger: to: "on" - platform: state - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock to: "idle" for: 00:00:05 @@ -22,16 +22,16 @@ action: - choose: - conditions: - condition: state - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock state: "playing" sequence: - action: media_player.media_stop target: - entity_id: media_player.ma_girls_room_hub + entity_id: media_player.ma_girls_room_clock - action: script.search_and_play_playlist data: - speaker: media_player.ma_girls_room_hub + speaker: media_player.ma_girls_room_clock search_term: Clever Kids Goodnight Songs volume: 0.25 repeat: all 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 f0493a9..d763528 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml @@ -10,4 +10,4 @@ action: - action: media_player.turn_off data: {} target: - entity_id: media_player.ma_home_assistant_voice_097b44_media_player + entity_id: media_player.ma_bedroom_hub 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 453c641..3a12ff2 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml @@ -9,8 +9,8 @@ trigger: action: - action: script.search_and_play_playlist data: - speaker: media_player.ma_master_bedroom_clock + speaker: media_player.ma_bedroom_hub search_term: CleverThunderstorm - volume: 0.25 + volume: 0.35 repeat: all - shuffle: false \ No newline at end of file + shuffle: false diff --git a/automations/things/handle_music_tag_scan.yaml b/automations/things/handle_music_tag_scan.yaml index 3f71a3f..e926270 100644 --- a/automations/things/handle_music_tag_scan.yaml +++ b/automations/things/handle_music_tag_scan.yaml @@ -7,7 +7,7 @@ max_exceeded: silent variables: # Map scanner device ID to media player entity ID sources: - 299e280bcc3579ca9b3ef714677dbf9b: girls_room_hub + 299e280bcc3579ca9b3ef714677dbf9b: girls_room_clock 75060fd1afdd90be: upstairs_speakers # Map tag ID to content tags: diff --git a/automations/things/handle_tag_scan_example.yaml b/automations/things/handle_tag_scan_example.yaml index 73ef879..3674653 100644 --- a/automations/things/handle_tag_scan_example.yaml +++ b/automations/things/handle_tag_scan_example.yaml @@ -8,7 +8,7 @@ max_exceeded: silent variables: # Map scanner device ID to media player entity ID sources: - 299e280bcc3579ca9b3ef714677dbf9b: girls_room_hub + 299e280bcc3579ca9b3ef714677dbf9b: girls_room_clock 75060fd1afdd90be: front_room_hub # Map tag ID to content tags: diff --git a/automations/things/handle_video_tag_scan.yaml b/automations/things/handle_video_tag_scan.yaml index 9d3a71f..7703b9f 100644 --- a/automations/things/handle_video_tag_scan.yaml +++ b/automations/things/handle_video_tag_scan.yaml @@ -7,7 +7,7 @@ max_exceeded: silent variables: # Map scanner device ID to media player entity ID devices: - 299e280bcc3579ca9b3ef714677dbf9b: media_player.girls_room_hub + 299e280bcc3579ca9b3ef714677dbf9b: media_player.girls_room_clock # Map tag ID to content tags: diff --git a/blueprints/automation/Twanne/party_lights.yaml b/blueprints/automation/Twanne/party_lights.yaml new file mode 100644 index 0000000..ebbe66b --- /dev/null +++ b/blueprints/automation/Twanne/party_lights.yaml @@ -0,0 +1,442 @@ +blueprint: + name: Party Lights + author: AntonH + homeassistant: + min_version: 2024.10.0 + description: '**Version 3.2** + + + Lights go to party mode (color loops or fade-in-and-out) + + + ⚠️ **NOTE:** ⚠️ + + *This automation is triggered by the status of a switch or an input_boolean entity.* + + *You can create this input_boolean by going to Settings > Devices & services > + Helpers* + + *There you click on ''Create helper and choose ''Toggle''.* + + ' + source_url: https://gist.github.com/Twanne/fe33ab8466f9a4e94b3f8e21f745a377 + domain: automation + input: + party_mode_trigger: + name: Party mode trigger + description: "The trigger you want to use to turn the party mode on.\nThe automation + will keep running until this is turned off.\nSupported entity types:\n - + input_boolean\n - switch\n" + default: [] + selector: + entity: + filter: + - domain: + - input_boolean + - switch + reorder: false + multiple: false + target_lights: + name: Target lights + description: Which lights do you want to control? + selector: + entity: + multiple: true + filter: + - domain: + - light + reorder: false + input_sync_lights: + name: Synchronize lights + description: 'If more than 1 target light is selected, choose if they will all + change to the same state or if they each get their own random values. + + `ℹ️ Light groups will be seen an a single entity.` + + ' + default: true + selector: + boolean: {} + time_between_changes: + name: Time between changes + description: Change the lights setting after this duration + default: + hours: 0 + minutes: 0 + seconds: 0 + milliseconds: 0 + selector: + duration: + enable_millisecond: true + transition_time: + name: Transition time + description: 'The time it takes for the light to transition to the assigned + value when it''s triggered. + + `⚠️ This value should not be greater than the time between changes!` + + ' + default: 0 + selector: + number: + min: 0.0 + max: 300.0 + step: 1.0 + unit_of_measurement: s + mode: slider + color_mode: + name: Color mode + description: "Select how the lights need to change\n \n 1. ⬛ **NO COLOR CHANGE:**\n + \ Don't change colors.\n 2. \U0001F500 **RANDOM COLOR MODE:**\n Change all + RGB values randomly.\n 3. \U0001F308 **SATURATED COLOR MODE**\n Random, + but deeply saturated, colors only.\n 4. \U0001F384 **CHRISTMAS COLORS:**\n + \ Change only between Christmas colors.\n 5. \U0001F6A8 **POLICE LIGHTS**\n + \ Change between red and blue.\n `⚠️ Lights will be synchronized!`\n 6. + \U0001F7E5 **REDS ONLY MODE:**\n Change only red value randomly.\n 7. \U0001F7E9 + **GREENS ONLY MODE:**\n Change only green value randomly.\n 8. \U0001F7E6 + **BLUES ONLY MODE:**\n Change only blue value randomly.\n 9. \U0001F7E6 + **TEALS ONLY MODE:**\n Change only teal shades randomly.\n 10. \U0001F338 + **PINKS ONLY MODE:**\n Change only pink shades randomly.\n 11. \U0001F7E8 + **YELLOWS ONLY MODE:**\n Change only yellow shades randomly.\n" + default: no_color_change + selector: + select: + mode: dropdown + options: + - label: NO COLOR CHANGE + value: no_color_change + - label: RANDOM COLOR MODE + value: random + - label: SATURATED COLOR MODE + value: deep + - label: CHRISTMAS COLORS + value: christmas + - label: POLICE LIGHTS + value: police + - label: REDS ONLY MODE + value: red + - label: GREENS ONLY MODE + value: green + - label: BLUES ONLY MODE + value: blue + - label: TEALS ONLY MODE + value: teal + - label: PINKS ONLY MODE + value: pink + - label: YELLOWS ONLY MODE + value: yellow + multiple: false + custom_value: false + sort: false + brightness_mode: + name: Brightness mode + description: "Select how the lights need to change\n 1. **RANDOM BRIGHTNESS:**\n + \ Change the brightness randomly within a set range\n \n 2. **FIXED BRIGHTNESS:**\n + \ Keep the light at a user defined brightness\n" + default: random + selector: + select: + mode: dropdown + options: + - label: RANDOM BRIGHTNESS + value: random + - label: FIXED BRIGHTNESS + value: fixed + multiple: false + custom_value: false + sort: false + random_brightness_section: + name: Settings for RANDOM BRIGHTNESS + icon: mdi:brightness-auto + collapsed: true + input: + min_brightness_pct: + name: Minimum brightness (RANDOM BRIGHTNESS MODE) + description: Don't set the brightness of the light below this value + default: 0 + selector: + number: + min: 0.0 + max: 100.0 + step: 1.0 + mode: slider + unit_of_measurement: '%' + max_brightness_pct: + name: Maximum brightness (RANDOM BRIGHTNESS MODE) + description: Don't set the brightness of the light above this value + default: 100 + selector: + number: + min: 0.0 + max: 100.0 + step: 1.0 + mode: slider + unit_of_measurement: '%' + fixed_brightness_section: + name: Settings for FIXED BRIGHTNESS + icon: mdi:brightness-percent + collapsed: true + input: + fixed_brightness_pct: + name: Brightness (FIXED BRIGHTNESS MODE) + description: Keep the light at this percentage (color changes might affect + this somewhat) + default: 0 + selector: + number: + min: 0.0 + max: 100.0 + step: 1.0 + mode: slider + unit_of_measurement: '%' + light_effects_section: + name: Light Effects + icon: mdi:creation-outline + collapsed: true + input: + light_effect: + name: Effects (All modes) + description: 'Which light effect do you want to run? + + `ℹ️ Recommended to set the time between changes long enough for the effects + to loop at least once.` + + ' + default: '' + selector: + text: + multiple: false + multiline: false + turn_off_settings_section: + name: Turn off settings + icon: mdi:cog-stop-outline + collapsed: true + input: + turn_off_delay: + name: Turn off delay + description: 'The time to wait before the automation is turned off and the + After Party State becomes active. + + ' + default: + hours: 0 + minutes: 0 + seconds: 0 + selector: + duration: {} + after_party_state: + name: After party state + description: "What state should the lights have when the party mode is turned + off.\n \n 1. **NO CHANGE:**\n Keep the lights in the state they are + at the end of the party.\n 2. **TURN OFF:**\n Turn the lights off.\n + \ 3. **RETURN TO PREVIOUS STATE:**\n Return the lights to the state they + were before the party began.\n 4. **USER DEFINED SCENE:**\n Activate + a scene that determines the state of the lights after the party.\n 5. + **SCENE THEN OFF**\n Set the lights to a specific setting by activating + the user defined scene, then turn them off.\n" + default: return_to_previous + selector: + select: + mode: dropdown + options: + - label: NO CHANGE + value: no_change + - label: LIGHTS OFF + value: lights_off + - label: RETURN TO PREVIOUS STATE + value: return_to_previous + - label: USER DEFINED SCENE + value: user_defined_scene + - label: SCENE THEN OFF + value: scene_then_off + multiple: false + custom_value: false + sort: false + after_party_scene: + name: After party scene + description: 'User defined scene that can be activated after the party mode + is turned off. + + ' + default: [] + selector: + entity: + filter: + - domain: + - scene + reorder: false + multiple: false +mode: restart +variables: + party_mode_trigger: !input party_mode_trigger + target_lights: !input target_lights + time_between_changes: !input time_between_changes + transition_time: !input transition_time + color_mode: !input color_mode + brightness_mode: !input brightness_mode + min_brightness_pct: !input min_brightness_pct + max_brightness_pct: !input max_brightness_pct + fixed_brightness_pct: !input fixed_brightness_pct + light_effect: !input light_effect + after_party_state: !input after_party_state + after_party_scene: !input after_party_scene + turn_off_delay: !input turn_off_delay + input_sync_lights: !input input_sync_lights + sync_lights: '{{ true if color_mode == "police" else input_sync_lights }} + + ' +triggers: +- trigger: state + entity_id: !input party_mode_trigger + to: 'on' +actions: +- action: scene.create + metadata: {} + data: + scene_id: before_state + snapshot_entities: '{{ target_lights }}' +- repeat: + sequence: + - choose: + - conditions: '{{ sync_lights is true }}' + sequence: + - variables: + brightness_value: "{% if brightness_mode == \"random\" %}\n {{ range(min_brightness_pct, + max_brightness_pct) | random }}\n{% else %}\n {{ fixed_brightness_pct + }}\n{% endif %}\n" + rgb_value: "{% if color_mode == \"random\" %}\n {{ range(256) | random, + range(256) | random, range(256) | random }}\n{% elif color_mode == \"deep\" + %}\n {% set r = range(256) |random %}\n {% set g = range(256) |random + %}\n {% set b = range(256) |random %}\n {# check if all values aren't + too high. This will mute the colors as they will go towards white. #}\n + \ {% if ( r >= 200 and g >= 200 and b >= 200) %}\n {% set rgb_changer + = range(3) | random %}\n \n {% if rgb_changer == 0 %}\n {{ + (r - 100), g, b }}\n {% elif rgb_changer == 1 %}\n {{ r, (g + - 100), b }}\n {% elif rgb_changer == 2 %}\n {{ r, g, (b - 100) + }}\n {% endif %} \n \n {# check if all values aren't too close + together. This will mute the colors because they will form a grey color. + #}\n {% elif ( (r - g)|abs <= 100 and (g - b)|abs <= 100 and (b - r)|abs + <= 100 ) %}\n {% set rgb_changer = range(3) | random %}\n {% + if rgb_changer == 0 %}\n {{ (r / 2)|int , g, b }}\n {% elif + rgb_changer == 1 %}\n {{ r, (g / 2)|int, b }}\n {% elif rgb_changer + == 2 %}\n {{ r, g, (b / 2)|int }}\n {% endif %}\n {% else %}\n + \ {{ r, g, b }}\n {% endif %}\n{% elif color_mode == \"christmas\" + %} \n {% macro random_rgb_component(max) %}\n {{ range(256) | random + }}\n {% endmacro %}\n {% macro get_color(color_key) %}\n {% if + color_key == 1 %}\n [{{ random_rgb_component(256) }}, 0, 0]\n {% + elif color_key == 2 %}\n [0, {{ random_rgb_component(256) }}, 0]\n + \ {% elif color_key == 3 %}\n [0, 0, {{ random_rgb_component(256) + }}]\n {% elif color_key == 4 %}\n [255, 255, {{ random_rgb_component(50) + }}]\n {% endif %}\n {% endmacro %}\n {% set color_key = range(1, + 5) | random %}\n {% set random_color = get_color(color_key) %}\n {{ + random_color }} \n{% elif color_mode == \"police\" %}\n {% if state_attr( + target_lights[0], 'rgb_color') | string == '(255, 0, 0)' %}\n [ 0, + 0, 255 ]\n {% else %}\n [ 255, 0, 0 ]\n {% endif %}\n{% elif color_mode + == \"red\" %}\n {{ range(256) | random, 0, 0 }}\n{% elif color_mode + == \"green\" %}\n {{ 0, range(256) | random, 0 }}\n{% elif color_mode + == \"blue\" %}\n {{ 0, 0, range(256) | random }}\n{% elif color_mode + == \"teal\" %}\n {{ range(256) | random, 255, 255 }}\n{% elif color_mode + == \"pink\" %}\n {{ 255, range(256) | random, 255 }}\n{% elif color_mode + == \"yellow\" %}\n {{ 255, 255, range(256) | random }}\n{% else %}\n + \ {{ 255, 255, 255 }}\n{% endif %}\n" + - action: light.turn_on + data: "{% if light_effect == \"\" %}\n {% if color_mode == \"no_color_change\" + %}\n {{ { \"transition\": transition_time, \"brightness_pct\": brightness_value + } }}\n {% else %}\n {{ { \"transition\": transition_time, \"brightness_pct\": + brightness_value, \"rgb_color\": rgb_value } }}\n {% endif %}\n{% else + %}\n {% if color_mode == \"no_color_change\" %}\n {{ { \"transition\": + transition_time, \"brightness_pct\": brightness_value, \"effect\": light_effect + \ } }}\n {% else %}\n {{ { \"transition\": transition_time, \"brightness_pct\": + brightness_value, \"rgb_color\": rgb_value, \"effect\": light_effect } + }}\n {% endif %}\n{% endif %}\n" + target: + entity_id: '{{ target_lights }}' + - conditions: '{{ sync_lights is false }}' + sequence: + - repeat: + for_each: '{{ target_lights }}' + sequence: + - variables: + brightness_value: "{% if brightness_mode == \"random\" %}\n {{ range(min_brightness_pct, + max_brightness_pct) | random }}\n{% else %}\n {{ fixed_brightness_pct + }}\n{% endif %}\n" + rgb_value: "{% if color_mode == \"random\" %}\n {{ range(256) | random, + range(256) | random, range(256) | random }}\n{% elif color_mode + == \"deep\" %}\n {% set r = range(256) |random %}\n {% set g = + range(256) |random %}\n {% set b = range(256) |random %}\n {# + check if all values aren't too high. This will mute the colors as + they will go towards white. #}\n {% if ( r >= 200 and g >= 200 + and b >= 200) %}\n {% set rgb_changer = range(3) | random %}\n + \ \n {% if rgb_changer == 0 %}\n {{ (r - 100), g, b }}\n + \ {% elif rgb_changer == 1 %}\n {{ r, (g - 100), b }}\n {% + elif rgb_changer == 2 %}\n {{ r, g, (b - 100) }}\n {% endif + %} \n \n {# check if all values aren't too close together. + This will mute the colors because they will form a grey color. #}\n + \ {% elif ( (r - g)|abs <= 100 and (g - b)|abs <= 100 and (b - r)|abs + <= 100 ) %}\n {% set rgb_changer = range(3) | random %}\n {% + if rgb_changer == 0 %}\n {{ (r / 2)|int , g, b }}\n {% elif + rgb_changer == 1 %}\n {{ r, (g / 2)|int, b }}\n {% elif + rgb_changer == 2 %}\n {{ r, g, (b / 2)|int }}\n {% endif + %}\n {% else %}\n {{ r, g, b }}\n {% endif %}\n{% elif color_mode + == \"christmas\" %} \n {% macro random_rgb_component(max) %}\n + \ {{ range(0, max) | random }}\n {% endmacro %}\n {% macro get_color(color_key) + %}\n {% if color_key == 1 %}\n [{{ random_rgb_component(256) + }}, 0, 0]\n {% elif color_key == 2 %}\n [0, {{ random_rgb_component(256) + }}, 0]\n {% elif color_key == 3 %}\n [0, 0, {{ random_rgb_component(256) + }}]\n {% elif color_key == 4 %}\n [255, 255, {{ random_rgb_component(50) + }}]\n {% endif %}\n {% endmacro %}\n {% set color_key = range(1, + 5) | random %}\n {% set random_color = get_color(color_key) %}\n + \ {{ random_color }}\n{% elif color_mode == \"red\" %}\n {{ range(256) + | random, 0, 0 }}\n{% elif color_mode == \"green\" %}\n {{ 0, range(256) + | random, 0 }}\n{% elif color_mode == \"blue\" %}\n {{ 0, 0, range(256) + | random }}\n{% elif color_mode == \"teal\" %}\n {{ range(256) + | random, 255, 255 }}\n{% elif color_mode == \"pink\" %}\n {{ 255, + range(256) | random, 255 }}\n{% elif color_mode == \"yellow\" %}\n + \ {{ 255, 255, range(256) | random }}\n{% else %}\n {{ 255, 255, + 255 }}\n{% endif %}\n" + - action: light.turn_on + data: "{% if light_effect == \"\" %}\n {% if color_mode == \"no_color_change\" + %}\n {{ { \"transition\": transition_time, \"brightness_pct\": + brightness_value } }}\n {% else %}\n {{ { \"transition\": transition_time, + \"brightness_pct\": brightness_value, \"rgb_color\": rgb_value } }}\n + \ {% endif %}\n{% else %}\n {% if color_mode == \"no_color_change\" + %}\n {{ { \"transition\": transition_time, \"brightness_pct\": + brightness_value, \"effect\": light_effect } }}\n {% else %}\n {{ + { \"transition\": transition_time, \"brightness_pct\": brightness_value, + \"rgb_color\": rgb_value, \"effect\": light_effect } }}\n {% endif + %}\n{% endif %}\n" + target: + entity_id: '{{ repeat.item }}' + - delay: !input time_between_changes + until: + - condition: state + entity_id: !input party_mode_trigger + state: 'off' +- delay: !input turn_off_delay +- choose: + - conditions: '{{ "lights_off" in after_party_state }}' + sequence: + - action: light.turn_off + target: + entity_id: '{{ target_lights }}' + - conditions: '{{ "return_to_previous" in after_party_state }}' + sequence: + - action: scene.turn_on + metadata: {} + target: + entity_id: scene.before_state + - conditions: '{{ "user_defined_scene" in after_party_state }}' + sequence: + - action: scene.turn_on + metadata: {} + target: + entity_id: '{{ after_party_scene }}' + - conditions: '{{ "scene_then_off" in after_party_state }}' + sequence: + - action: scene.turn_on + metadata: {} + target: + entity_id: '{{ after_party_scene }}' + - action: light.turn_off + target: + entity_id: '{{ target_lights }}' diff --git a/components/alerts/dream_frigate_offline.yaml b/components/alerts/dream_frigate_offline.yaml new file mode 100644 index 0000000..fd0f1d3 --- /dev/null +++ b/components/alerts/dream_frigate_offline.yaml @@ -0,0 +1,12 @@ +name: "Dream-Frigate is unavailable" +done_message: "Dream-Frigate is now available" +entity_id: sensor.frigate_status +state: unavailable +repeat: + - 1 + - 5 + - 15 +can_acknowledge: True +skip_first: true +notifiers: + - mobile_app_pixel_7 diff --git a/components/packages/adaptive_lighting.yaml b/components/packages/adaptive_lighting.yaml index bb4d1d9..420ad83 100644 --- a/components/packages/adaptive_lighting.yaml +++ b/components/packages/adaptive_lighting.yaml @@ -1,36 +1,36 @@ adaptive_lighting: - - name: "Southern" - lights: [] - interval: 90 - transition: 45 - initial_transition: 1 - min_brightness: 1 - max_brightness: 100 - min_color_temp: 2000 - max_color_temp: 6500 - prefer_rgb_color: false - sleep_brightness: 1 - sleep_color_temp: 1000 - min_sunrise_time: "05:30:00" - max_sunrise_time: "07:00:00" - min_sunset_time: "19:00:00" - max_sunset_time: "21:00:00" - take_over_control: true - detect_non_ha_changes: false - only_once: false + # - name: "Southern" + # lights: [] + # interval: 90 + # transition: 45 + # initial_transition: 1 + # min_brightness: 1 + # max_brightness: 100 + # min_color_temp: 2000 + # max_color_temp: 6500 + # prefer_rgb_color: false + # sleep_brightness: 1 + # sleep_color_temp: 1000 + # min_sunrise_time: "05:30:00" + # max_sunrise_time: "07:00:00" + # min_sunset_time: "19:00:00" + # max_sunset_time: "21:00:00" + # take_over_control: true + # detect_non_ha_changes: false + # only_once: false - - name: "Northern" - lights: [] - interval: 90 - transition: 45 - initial_transition: 1 - min_brightness: 1 - max_brightness: 100 - min_color_temp: 2000 - max_color_temp: 6500 - prefer_rgb_color: false - sleep_brightness: 1 - sleep_color_temp: 1000 - take_over_control: true - detect_non_ha_changes: false - only_once: false \ No newline at end of file + # - name: "Northern" + # lights: [] + # interval: 90 + # transition: 45 + # initial_transition: 1 + # min_brightness: 1 + # max_brightness: 100 + # min_color_temp: 2000 + # max_color_temp: 6500 + # prefer_rgb_color: false + # sleep_brightness: 1 + # sleep_color_temp: 1000 + # take_over_control: true + # detect_non_ha_changes: false + # only_once: false \ No newline at end of file diff --git a/components/packages/ambientsounds.yaml b/components/packages/ambientsounds.yaml index 54bb5da..813c82e 100644 --- a/components/packages/ambientsounds.yaml +++ b/components/packages/ambientsounds.yaml @@ -28,10 +28,10 @@ group: - media_player.great_room - media_player.kitchen - media_player.front_room_hub - - media_player.girls_room_hub + - media_player.girls_room_clock - media_player.boys_room_clock - media_player.bathroom_mini - - media_player.ma_home_assistant_voice_097b44_media_player + - media_player.bedroom_hub - media_player.computer_area_hub ###### INPUT SELECT ------------------------------------------ @@ -101,7 +101,7 @@ script: {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen - {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub + {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_clock {% elif is_state("input_select.google_home", "Boys Room") %} media_player.boys_room_clock {% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub {% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public @@ -116,7 +116,7 @@ script: {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen - {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub + {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_clock {% elif is_state("input_select.google_home", "Boys Room") %} media_player.boys_room_clock {% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub {% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public @@ -162,10 +162,10 @@ script: data_template: entity_id: > {% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub - {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player + {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.bedroom_hub {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen - {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub + {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_clock {% elif is_state("input_select.google_home", "Boys Room") %} media_player.boys_room_clock {% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub {% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public @@ -188,10 +188,10 @@ automation: data_template: entity_id: > {% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub - {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player + {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.bedroom_hub {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen - {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub + {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_clock {% elif is_state("input_select.google_home", "Boys Room") %} media_player.boys_room_clock {% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub {% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public diff --git a/components/packages/camera_casting.yaml b/components/packages/camera_casting.yaml index 203df71..299b121 100644 --- a/components/packages/camera_casting.yaml +++ b/components/packages/camera_casting.yaml @@ -18,7 +18,7 @@ input_select: name: To Screen options: - Front Room Display - - Girls Room Hub + - Bedroom Hub - Computer Area Hub script: @@ -31,8 +31,8 @@ script: media_player: > {% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %} media_player.front_room_hub - {% elif is_state('input_select.cast_to_screen_dropdown', 'Girls Room Hub') %} - media_player.girls_room_hub + {% elif is_state('input_select.cast_to_screen_dropdown', 'Bedroom Hub') %} + media_player.bedroom_hub {% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %} media_player.computer_area_hub {% endif %} @@ -119,7 +119,7 @@ script: # {% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %} # media_player.front_room_hub # {% elif is_state('input_select.cast_to_screen_dropdown', 'Girls Room Hub') %} - # media_player.girls_room_hub + # media_player.bedroom_hub # {% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %} # media_player.computer_area_hub # {% endif %} @@ -152,7 +152,7 @@ script: # {% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %} # media_player.front_room_hub # {% elif is_state('input_select.cast_to_screen_dropdown', 'Girls Room Hub') %} - # media_player.girls_room_hub + # media_player.bedroom_hub # {% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %} # media_player.computer_area_hub # {% endif %} @@ -188,7 +188,7 @@ script: # {% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %} # media_player.front_room_hub # {% elif is_state('input_select.cast_to_screen_dropdown', 'Girls Room Hub') %} - # media_player.girls_room_hub + # media_player.bedroom_hub # {% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %} # media_player.computer_area_hub # {% endif %} diff --git a/components/packages/esphome_devices.yaml b/components/packages/esphome_devices.yaml index ff15a38..0fba8f3 100644 --- a/components/packages/esphome_devices.yaml +++ b/components/packages/esphome_devices.yaml @@ -14,7 +14,7 @@ template: - name: Master Bed Occupied unique_id: a5620335-43a1-47ce-bf37-ac8433f3a406 - state: "{{ is_state('binary_sensor.bed_presence_2d14a4_bed_occupied_either', 'on') }}" + state: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_either', 'on') }}" icon: > {% if is_state("binary_sensor.master_bed_occupied", "on") %} mdi:bed-king diff --git a/components/packages/logger.yaml b/components/packages/logger.yaml index 2c85149..d1c5798 100644 --- a/components/packages/logger.yaml +++ b/components/packages/logger.yaml @@ -2,6 +2,8 @@ logger: default: warning logs: + # Adaptive Lighting Issues + # custom_components.adaptive_lighting: debug # WebRTC issues # custom_components.webrtc: debug diff --git a/components/packages/temperature_management.yaml b/components/packages/temperature_management.yaml index 8d13d34..9767810 100644 --- a/components/packages/temperature_management.yaml +++ b/components/packages/temperature_management.yaml @@ -254,3 +254,11 @@ template: availability: "{{ (states('climate.thermostat') not in ['unknown', 'unavailable']) }}" device_class: duration unit_of_measurement: min + + - name: HVAC Preset Mode + unique_id: templatesensor_hvac_preset_mode + state: "{{state_attr('climate.thermostat','preset_mode')}}" + availability: "{{ (states('climate.thermostat') not in ['unknown', 'unavailable']) }}" + device_class: enum + attributes: + options: "{{state_attr('climate.thermostat','preset_modes')}}" \ No newline at end of file diff --git a/components/packages/zwave_nodes.yaml b/components/packages/zwave_nodes.yaml index 8e5ed77..87b5e20 100644 --- a/components/packages/zwave_nodes.yaml +++ b/components/packages/zwave_nodes.yaml @@ -7,17 +7,28 @@ template: {{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") | selectattr('state', 'in', 'alive') | map(attribute='entity_id')| list | count | int(default=0)}} + attributes: + devices: >- + {{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") | + selectattr('state', 'in', 'alive') | map(attribute='entity_id')| list }} - name: "Dead ZWave Devices" unique_id: template_sensor_failed_zwave icon: mdi:z-wave state: >- {{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") | - selectattr('state', 'in', 'alive') | map(attribute='entity_id')| list | count | int(default=0)}} + selectattr('state', 'in', 'dead') | map(attribute='entity_id')| list | count | int(default=0)}} attributes: devices: >- {{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") | - selectattr('state', 'in', 'alive') | map(attribute='entity_id')| list }} + selectattr('state', 'in', 'dead') | map(attribute='entity_id')| list }} + + - name: ZWave Pending Updates + unique_id: 6bf2876a-378a-4394-8a97-5b0603b17f2e + state: "{{ states.update | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | select ('in',integration_entities('Z-Wave JS')) | list | count }}" + icon: mdi:z-wave + attributes: + devices: "{{ states.update | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | select ('in',integration_entities('Z-Wave JS')) | list }}" automation: - id: automation_alert_failed_zwave_nodes diff --git a/custom_sentences/en/media.yaml b/custom_sentences/en/media.yaml index 603601b..c919da9 100644 --- a/custom_sentences/en/media.yaml +++ b/custom_sentences/en/media.yaml @@ -12,10 +12,10 @@ lists: - in: "front room" out: "media_player.front_room_hub" - in: "master bedroom" - out: "media_player.master_bedroom_clock" + out: "media_player.bedroom_hub" - in: "downstairs" out: "media_player.computer_area_hub" volume: range: from: 0 - to: 100 \ No newline at end of file + to: 100 diff --git a/customizations/entities/media_players.yaml b/customizations/entities/media_players.yaml index 274def1..5222014 100644 --- a/customizations/entities/media_players.yaml +++ b/customizations/entities/media_players.yaml @@ -46,13 +46,13 @@ # media_player.kitchen: # icon: mdi:cast-audio -# media_player.master_bedroom_clock: +# media_player.bedroom_hub: # icon: mdi:cast-audio # # media_player.master_bedroom_tv: # # icon: mdi:cast-variant -# media_player.girls_room_hub: +# media_player.bedroom_hub: # icon: mdi:cast-variant # media_player.outside: diff --git a/esphome/archive/power-monitor.yaml b/esphome/archive/power-monitor.yaml index 556a5d5..e3d8c16 100644 --- a/esphome/archive/power-monitor.yaml +++ b/esphome/archive/power-monitor.yaml @@ -810,7 +810,7 @@ sensor: topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_kwh/status payload_available: online payload_not_available: offline - state_topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_kwh + state_topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_kwh # min_save_interval: ${update_time} #kWh From CT 22 diff --git a/esphome/bed-presence-c175a4.yaml b/esphome/bed-presence-c175a4.yaml index 2ce261e..2b654e9 100644 --- a/esphome/bed-presence-c175a4.yaml +++ b/esphome/bed-presence-c175a4.yaml @@ -38,14 +38,15 @@ packages: - bed-presence-mk1/base.yaml - esphome-common/bluetooth-proxy.yaml + binary_sensor: - - id: !remove local_status_sensor + - id: !remove bed_presence_status button: - - id: !remove local_restart_button + - id: !remove btn_restart sensor: - - id: !remove local_uptime_sensor + - id: !remove bed_presence_uptime # See https://github.com/ElevatedSensors/sensor-configs/blob/main/bed-presence-mk1/sensor.yaml for a detailed # description of available substitutions. # diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml index 6523e41..5db2418 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml @@ -6,33 +6,45 @@ sensor: ############ - platform: atm90e32 release_device: true - cs_pin: 0 + cs_pin: ${addon1_ic1} id: ${addon1_id1} phase_a: current: - name: ${ct7_name} Amps + name: ${ct7_name} ${amp_label} id: ct7Amps power: - name: ${ct7_name} Watts + name: ${ct7_name} ${watt_label} id: ct7Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct7} phase_b: current: - name: ${ct8_name} Amps + name: ${ct8_name} ${amp_label} id: ct8Amps power: - name: ${ct8_name} Watts + name: ${ct8_name} ${watt_label} id: ct8Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct8} phase_c: current: - name: ${ct9_name} Amps + name: ${ct9_name} ${amp_label} id: ct9Amps power: - name: ${ct9_name} Watts + name: ${ct9_name} ${watt_label} id: ct9Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct9} line_frequency: ${electric_freq} @@ -44,33 +56,45 @@ sensor: ############ - platform: atm90e32 release_device: true - cs_pin: 16 + cs_pin: ${addon1_ic2} id: ${addon1_id2} phase_a: current: - name: ${ct10_name} Amps + name: ${ct10_name} ${amp_label} id: ct10Amps power: - name: ${ct10_name} Watts + name: ${ct10_name} ${watt_label} id: ct10Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct10} phase_b: current: - name: ${ct11_name} Amps + name: ${ct11_name} ${amp_label} id: ct11Amps power: - name: ${ct11_name} Watts + name: ${ct11_name} ${watt_label} id: ct11Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct11} phase_c: current: - name: ${ct12_name} Amps + name: ${ct12_name} ${amp_label} id: ct12Amps power: - name: ${ct12_name} Watts + name: ${ct12_name} ${watt_label} id: ct12Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct12} line_frequency: ${electric_freq} @@ -79,9 +103,9 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total Amps AddOn1 +#Total A AddOn1 - platform: template - name: ${friendly_name} Total Amps Add-on1 + 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 @@ -89,12 +113,78 @@ sensor: device_class: current update_interval: ${update_time} -#Total Watts AddOn1 +#Total W AddOn1 - platform: template - name: ${friendly_name} Total Watts Add-on1 + 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 + name: ${ct7_name} ${kwh_label} + id: ct7Kwh + power_id: ct7Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + # kWh from CT 8 + - platform: total_daily_energy + name: ${ct8_name} ${kwh_label} + id: ct8Kwh + power_id: ct8Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 9 + - platform: total_daily_energy + name: ${ct9_name} ${kwh_label} + id: ct9Kwh + power_id: ct9Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 10 + - platform: total_daily_energy + name: ${ct10_name} ${kwh_label} + id: ct10Kwh + power_id: ct10Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 11 + - platform: total_daily_energy + name: ${ct11_name} ${kwh_label} + id: ct11Kwh + power_id: ct11Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 12 + - platform: total_daily_energy + name: ${ct12_name} ${kwh_label} + id: ct12Kwh + power_id: ct12Watts + filters: + - multiply: 0.001 + 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 6c50c4b..00466b7 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml @@ -5,34 +5,46 @@ sensor: #IC1 AddOn 2 ############ - platform: atm90e32 - cs_pin: 27 + cs_pin: ${addon2_ic1} release_device: true id: ${addon2_id1} phase_a: current: - name: ${ct13_name} Amps + name: ${ct13_name} ${amp_label} id: ct13Amps power: - name: ${ct13_name} Watts + name: ${ct13_name} ${watt_label} id: ct13Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct13} phase_b: current: - name: ${ct14_name} Amps + name: ${ct14_name} ${amp_label} id: ct14Amps power: - name: ${ct14_name} Watts + name: ${ct14_name} ${watt_label} id: ct14Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct14} phase_c: current: - name: ${ct15_name} Amps + name: ${ct15_name} ${amp_label} id: ct15Amps power: - name: ${ct15_name} Watts + name: ${ct15_name} ${watt_label} id: ct15Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct15} line_frequency: ${electric_freq} @@ -44,33 +56,45 @@ sensor: ############ - platform: atm90e32 release_device: true - cs_pin: 17 + cs_pin: ${addon2_ic2} id: ${addon2_id2} phase_a: current: - name: ${ct16_name} Amps + name: ${ct16_name} ${amp_label} id: ct16Amps power: - name: ${ct16_name} Watts + name: ${ct16_name} ${watt_label} id: ct16Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct16} phase_b: current: - name: ${ct17_name} Amps + name: ${ct17_name} ${amp_label} id: ct17Amps power: - name: ${ct17_name} Watts + name: ${ct17_name} ${watt_label} id: ct17Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct17} phase_c: current: - name: ${ct18_name} Amps + name: ${ct18_name} ${amp_label} id: ct18Amps power: - name: ${ct18_name} Watts + name: ${ct18_name} ${watt_label} id: ct18Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct18} line_frequency: ${electric_freq} @@ -79,9 +103,9 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total Amps AddOn2 +#Total A AddOn2 - platform: template - name: ${friendly_name} Total Amps Add-on2 + 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 @@ -89,12 +113,78 @@ sensor: device_class: current update_interval: ${update_time} -#Total Watts AddOn2 +#Total W AddOn2 - platform: template - name: ${friendly_name} Total Watts Add-on2 + 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 + name: ${ct13_name} ${kwh_label} + id: ct13Kwh + power_id: ct13Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + # kWh from CT 14 + - platform: total_daily_energy + name: ${ct14_name} ${kwh_label} + id: ct14Kwh + power_id: ct14Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 15 + - platform: total_daily_energy + name: ${ct15_name} ${kwh_label} + id: ct15Kwh + power_id: ct15Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 16 + - platform: total_daily_energy + name: ${ct16_name} ${kwh_label} + id: ct16Kwh + power_id: ct16Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 17 + - platform: total_daily_energy + name: ${ct17_name} ${kwh_label} + id: ct17Kwh + power_id: ct17Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 18 + - platform: total_daily_energy + name: ${ct18_name} ${kwh_label} + id: ct18Kwh + power_id: ct18Watts + filters: + - multiply: 0.001 + 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 f69d18b..9fe91fe 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml @@ -7,33 +7,45 @@ sensor: - platform: atm90e32 release_device: true #if ESP32 has an LED for GPIO2, remove jumper or ESP32 from meter stack before programming via serial - cs_pin: 2 + cs_pin: ${addon3_ic1} id: ${addon3_id1} phase_a: current: - name: ${ct19_name} Amps + name: ${ct19_name} ${amp_label} id: ct19Amps power: - name: ${ct19_name} Watts + name: ${ct19_name} ${watt_label} id: ct19Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct19} phase_b: current: - name: ${ct20_name} Amps + name: ${ct20_name} ${amp_label} id: ct20Amps power: - name: ${ct20_name} Watts + name: ${ct20_name} ${watt_label} id: ct20Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct20} phase_c: current: - name: ${ct21_name} Amps + name: ${ct21_name} ${amp_label} id: ct21Amps power: - name: ${ct21_name} Watts + name: ${ct21_name} ${watt_label} id: ct21Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct21} line_frequency: ${electric_freq} @@ -45,33 +57,45 @@ sensor: ############ - platform: atm90e32 release_device: true - cs_pin: 21 + cs_pin: ${addon3_ic2} id: ${addon3_id2} phase_a: current: - name: ${ct22_name} Amps + name: ${ct22_name} ${amp_label} id: ct22Amps power: - name: ${ct22_name} Watts + name: ${ct22_name} ${watt_label} id: ct22Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct22} phase_b: current: - name: ${ct23_name} Amps + name: ${ct23_name} ${amp_label} id: ct23Amps power: - name: ${ct23_name} Watts + name: ${ct23_name} ${watt_label} id: ct23Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct23} phase_c: current: - name: ${ct24_name} Amps + name: ${ct24_name} ${amp_label} id: ct24Amps power: - name: ${ct24_name} Watts + name: ${ct24_name} ${watt_label} id: ct24Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct24} line_frequency: ${electric_freq} @@ -80,9 +104,9 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total Amps AddOn3 +#Total A AddOn3 - platform: template - name: ${friendly_name} Total Amps Add-on3 + 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 @@ -90,12 +114,78 @@ sensor: device_class: current update_interval: ${update_time} -#Total Watts AddOn3 +#Total W AddOn3 - platform: template - name: ${friendly_name} Total Watts Add-on3 + 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 + name: ${ct19_name} ${kwh_label} + id: ct19Kwh + power_id: ct19Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + # kWh from CT 20 + - platform: total_daily_energy + name: ${ct20_name} ${kwh_label} + id: ct20Kwh + power_id: ct20Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 21 + - platform: total_daily_energy + name: ${ct21_name} ${kwh_label} + id: ct21Kwh + power_id: ct21Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 22 + - platform: total_daily_energy + name: ${ct22_name} ${kwh_label} + id: ct22Kwh + power_id: ct22Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 23 + - platform: total_daily_energy + name: ${ct23_name} ${kwh_label} + id: ct23Kwh + power_id: ct23Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 24 + - platform: total_daily_energy + name: ${ct24_name} ${kwh_label} + id: ct24Kwh + power_id: ct24Watts + filters: + - multiply: 0.001 + 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 258660d..9ddc01e 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml @@ -3,7 +3,7 @@ sensor: ######### - platform: atm90e32 release_device: true - cs_pin: 5 + cs_pin: ${main_ic1} id: ${main_meter_id1} phase_a: voltage: @@ -11,35 +11,45 @@ sensor: id: ic1Volts accuracy_decimals: 1 current: - name: ${ct1_name} Amps + 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 power: - name: ${ct1_name} Watts + name: ${ct1_name} ${watt_label} id: ct1Watts -# filters: -# - multiply: 2 + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct1} phase_b: current: - name: ${ct2_name} Amps + name: ${ct2_name} ${amp_label} id: ct2Amps power: - name: ${ct2_name} Watts + name: ${ct2_name} ${watt_label} id: ct2Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct2} phase_c: current: - name: ${ct3_name} Amps + name: ${ct3_name} ${amp_label} id: ct3Amps power: - name: ${ct3_name} Watts + name: ${ct3_name} ${watt_label} id: ct3Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal1} gain_ct: ${current_cal_ct3} frequency: @@ -55,7 +65,7 @@ sensor: ########## - platform: atm90e32 release_device: true - cs_pin: 4 + cs_pin: ${main_ic2} id: ${main_meter_id2} phase_a: #this voltage is only needed if monitoring 2 voltages @@ -64,29 +74,41 @@ sensor: # id: ic2Volts # accuracy_decimals: 1 current: - name: ${ct4_name} Amps + name: ${ct4_name} ${amp_label} id: ct4Amps power: - name: ${ct4_name} Watts + name: ${ct4_name} ${watt_label} id: ct4Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct4} phase_b: current: - name: ${ct5_name} Amps + name: ${ct5_name} ${amp_label} id: ct5Amps power: - name: ${ct5_name} Watts + name: ${ct5_name} ${watt_label} id: ct5Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct5} phase_c: current: - name: ${ct6_name} Amps + name: ${ct6_name} ${amp_label} id: ct6Amps power: - name: ${ct6_name} Watts + name: ${ct6_name} ${watt_label} id: ct6Watts + filters: + - lambda: |- + if (x < 0) return x * -1; + return x; gain_voltage: ${voltage_cal2} gain_ct: ${current_cal_ct6} #this is only needed if monitoring 2 voltages @@ -100,24 +122,90 @@ sensor: enable_offset_calibration: ${offset_calibration} enable_gain_calibration: ${gain_calibration} -#Total Amps Main +#Total A Main ################ - platform: template - name: ${friendly_name} Total Amps Main + 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} - -#Total Watts Main + +#Total W Main ################# - platform: template - name: ${friendly_name} Total Watts Main + 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} + + #kWh From CT 1 + - platform: total_daily_energy + name: ${ct1_name} ${kwh_label} + id: ct1Kwh + power_id: ct1Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + # kWh from CT 2 + - platform: total_daily_energy + name: ${ct2_name} ${kwh_label} + id: ct2Kwh + power_id: ct2Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 3 + - platform: total_daily_energy + name: ${ct3_name} ${kwh_label} + id: ct3Kwh + power_id: ct3Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 4 + - platform: total_daily_energy + name: ${ct4_name} ${kwh_label} + id: ct4Kwh + power_id: ct4Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 5 + - platform: total_daily_energy + name: ${ct5_name} ${kwh_label} + id: ct5Kwh + power_id: ct5Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing + + #kWh From CT 6 + - platform: total_daily_energy + name: ${ct6_name} ${kwh_label} + id: ct6Kwh + power_id: ct6Watts + filters: + - multiply: 0.001 + unit_of_measurement: kWh + device_class: energy + state_class: total_increasing \ No newline at end of file diff --git a/esphome/common/device_base.yaml b/esphome/common/device_base.yaml index 7b7b92f..cdb860e 100644 --- a/esphome/common/device_base.yaml +++ b/esphome/common/device_base.yaml @@ -11,7 +11,7 @@ logger: # Sync time with Home Assistant. time: - platform: homeassistant - id: homeassistant_time + id: local_homeassistant_time # Enable Home Assistant API api: @@ -23,8 +23,12 @@ ota: - platform: esphome password: !secret ota-password +debug: + update_interval: 10s + packages: binary_sensor: !include binary_sensor/status_sensor.config.yaml button: !include button/restart_button.config.yaml sensor: !include sensor/uptime_sensor.config.yaml + debug: !include sensor/debug_sensor.config.yaml text_sensor: !include text_sensor/version_sensor.config.yaml diff --git a/esphome/common/sensor/debug_sensor.config.yaml b/esphome/common/sensor/debug_sensor.config.yaml new file mode 100644 index 0000000..e41f790 --- /dev/null +++ b/esphome/common/sensor/debug_sensor.config.yaml @@ -0,0 +1,10 @@ +sensor: + - platform: debug + free: + name: "Heap Free" + id: heap_free_sensor + entity_category: diagnostic + loop_time: + name: "Loop Time" + id: loop_time_sensor + entity_category: diagnostic \ No newline at end of file diff --git a/esphome/common/sensor/rssi_sensor.config.yaml b/esphome/common/sensor/rssi_sensor.config.yaml index a6208f4..80e6567 100644 --- a/esphome/common/sensor/rssi_sensor.config.yaml +++ b/esphome/common/sensor/rssi_sensor.config.yaml @@ -8,6 +8,7 @@ sensor: - platform: copy # Reports the WiFi signal strength in % source_id: local_wifi_signal_db + id: local_wifi_signal_percent name: "WiFi Signal Strength" filters: - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); diff --git a/esphome/common/text_sensor/wifi_sensor.config.yaml b/esphome/common/text_sensor/wifi_sensor.config.yaml index a3022bb..7bef96f 100644 --- a/esphome/common/text_sensor/wifi_sensor.config.yaml +++ b/esphome/common/text_sensor/wifi_sensor.config.yaml @@ -3,17 +3,17 @@ text_sensor: ip_address: name: IP icon: mdi:ip - update_interval: 60s + # update_interval: 60s disabled_by_default: true ssid: name: SSID icon: mdi:lan - update_interval: 60s + # update_interval: 60s disabled_by_default: true bssid: name: BSSID disabled_by_default: true - update_interval: 60s + # update_interval: 60s icon: mdi:router-network mac_address: name: Wifi MAC Address diff --git a/esphome/common/waveshare_esp32_s3_wifi.yaml b/esphome/common/waveshare_esp32_s3_wifi.yaml index a795329..6994b8c 100644 --- a/esphome/common/waveshare_esp32_s3_wifi.yaml +++ b/esphome/common/waveshare_esp32_s3_wifi.yaml @@ -21,8 +21,6 @@ psram: packages: network: !include ../common/wifi.yaml -# captive_portal: - # wifi: # # Enable fast connect # fast_connect: true diff --git a/esphome/common/wifi.yaml b/esphome/common/wifi.yaml index bc9c5b1..5753088 100644 --- a/esphome/common/wifi.yaml +++ b/esphome/common/wifi.yaml @@ -1,11 +1,11 @@ esphome: -captive_portal: wifi: # Enable fast connect fast_connect: true min_auth_mode: WPA2 use_address: ${devicename}.local + #use_address: ${static_ip} networks: - ssid: !secret wifi_ssid diff --git a/esphome/common/wifi_dhcp.yaml b/esphome/common/wifi_dhcp.yaml index ed424ba..f0c1a94 100644 --- a/esphome/common/wifi_dhcp.yaml +++ b/esphome/common/wifi_dhcp.yaml @@ -1,5 +1,4 @@ esphome: -captive_portal: wifi: # Enable fast connect diff --git a/esphome/power-monitor.yaml b/esphome/power-monitor.yaml index e3d8c16..24dec72 100644 --- a/esphome/power-monitor.yaml +++ b/esphome/power-monitor.yaml @@ -13,9 +13,11 @@ substitutions: devicename: power-monitor - friendly_name: 'PM:' + #disp_name: power-monitor + disp_name: power-monitor + friendly_name: 'Power Monitor' entity_name: power_monitor - comment: Clever Power Monitor + comment: Circuit Setup Power Monitor static_ip: !secret power-monitor-ip platform: ESP32 board: nodemcu-32s @@ -30,34 +32,57 @@ substitutions: #fast_update_time: 10s #medium_update_time: 30s #slow_update_time: 60s + watt_label: W + amp_label: A + kwh_label: kWh - ct01Name: 'Grid Phase A' - ct04Name: 'Grid Phase B' + main_meter_name1: Meter 1-3 + main_meter_name2: Meter 4-6 + main_meter_id1: meter_main1 + main_meter_id2: meter_main2 +## Addon1 + addon1_name1: Addon1 7-9 + addon1_name2: Addon1 10-12 + addon1_id1: addon1_1 + addon1_id2: addon1_2 +## Addon2 + addon2_name1: Addon2 13-15 + addon2_name2: Addon2 16-18 + addon2_id1: addon2_1 + addon2_id2: addon2_2 +## Addon3 + addon3_name1: Addon3 19-21 + addon3_name2: Addon3 22-24 + addon3_id1: addon3_1 + addon3_id2: addon3_2 - ct22Name: 'Well' # 1, 3 # sct010 - O - ct12Name: 'Kitchen 1' # 5 # sct006 - L - ct16Name: 'Kitchen 2' # 7 # sct006 - S - ct18Name: 'Laundry Plug' # 9 # sct006 - N - ct08Name: 'Microwave Plug' # 11 # sct006 - H - ct17Name: 'Bathroom Plug' # 13 # sct006 - R - ct11Name: 'Heat Pump' # 15, 17 - M - ct24Name: 'Basement Bedroom and Furnace Room Lights' # 19 # sct006 - K - ct05Name: 'Basement Plugs' # 21a # sct006 - E - ct23Name: 'Basement and Laundry Lights and Plugs' # 21b # sct006 - W - ct07Name: 'Sump Pump Plug' # 23 # sct006 - C + ct1_name: 'Grid Phase A' + ct4_name: 'Grid Phase B' - ct06Name: 'Nursery, Dining, Kitchen Lights' # 2 # sct006 - F - ct20Name: 'Master Suite' # 4 # sct006 - T - ct03Name: 'Furnace' # 6 # sct006 - D - ct15Name: 'Basement Stairs and Lights' # 8 # sct006 - P - ct21Name: 'Dishwasher' # 10 # sct006 - V - ct13Name: 'Garage Outside and Front Garage Lights' # 12 # sct006 - U - ct10Name: 'Front Room Plugs' # 14 # sct006 - J - ct14Name: 'Garage and Outside Plugs' # 16 # sct006 - Q - ct09Name: 'Stove' # 18, 20 # sct016 - I - ct02Name: 'Dryer' # 22, 24 # sct010 - G + ct22_name: 'Well' # 1, 3 # sct010 - O + ct12_name: 'Kitchen 1' # 5 # sct006 - L + ct16_name: 'Kitchen 2' # 7 # sct006 - S + ct18_name: 'Laundry Plug' # 9 # sct006 - N + ct8_name: 'Microwave Plug' # 11 # sct006 - H + ct17_name: 'Bathroom Plug' # 13 # sct006 - R + ct11_name: 'Heat Pump' # 15, 17 - M + ct24_name: 'Basement Bedroom and Furnace Room Lights' # 19 # sct006 - K + ct5_name: 'Basement Plugs' # 21a # sct006 - E + ct23_name: 'Basement and Laundry Lights and Plugs' # 21b # sct006 - W + ct7_name: 'Sump Pump Plug' # 23 # sct006 - C - ct19Name: 'Unused' + ct6_name: 'Nursery, Dining, Kitchen Lights' # 2 # sct006 - F + ct20_name: 'Master Suite' # 4 # sct006 - T + ct3_name: 'Furnace' # 6 # sct006 - D + ct15_name: 'Basement Stairs and Lights' # 8 # sct006 - P + ct21_name: 'Dishwasher' # 10 # sct006 - V + ct13_name: 'Garage Outside and Front Garage Lights' # 12 # sct006 - U + ct10_name: 'Front Room Plugs' # 14 # sct006 - J + ct14_name: 'Garage and Outside Plugs' # 16 # sct006 - Q + ct9_name: 'Stove' # 18, 20 # sct016 - I + ct2_name: 'Dryer' # 22, 24 # sct010 - G + + ct19_name: 'Unused' # Current Transformers: @@ -76,458 +101,253 @@ substitutions: # Jameco 9VAC Transformer: # For meter versions: # >= v1.3: 7305 - voltage_cal: '7305' + #voltage_cal: '7305' +## Main Board + current_cal_ct1: '41787' + current_cal_ct2: '41660' + current_cal_ct3: '11143' + current_cal_ct4: '41787' + current_cal_ct5: '11143' + current_cal_ct6: '11143' +## Addon1 + current_cal_ct7: '11143' + current_cal_ct8: '11143' + current_cal_ct9: '27518' + current_cal_ct10: '11143' + current_cal_ct11: '41660' + current_cal_ct12: '11143' +## Addon2 + current_cal_ct13: '11143' + current_cal_ct14: '11143' + current_cal_ct15: '11143' + current_cal_ct16: '11143' + current_cal_ct17: '11143' + current_cal_ct18: '11143' +## Addon3 + current_cal_ct19: '11143' + current_cal_ct20: '11143' + current_cal_ct21: '11143' + current_cal_ct22: '41660' + current_cal_ct23: '11143' + current_cal_ct24: '11143' +# This only needs to be changed if you're using something other than the +# Jameco 9VAC Transformer: + voltage_cal1: '7305' + voltage_cal2: '7305' + + electric_freq: "60Hz" + + offset_calibration: "true" + gain_calibration: "true" spi_clk: 18 spi_miso: 19 spi_mosi: 23 - ic1_main: 5 - ic1_addon1: 0 - ic1_addon2: 27 - ic1_addon3: 2 - ic2_main: 4 - ic2_addon1: 16 - ic2_addon2: 17 - ic2_addon3: 21 + main_ic1: 5 + addon1_ic1: 0 + addon2_ic1: 27 + addon3_ic1: 2 + main_ic2: 4 + addon1_ic2: 16 + addon2_ic2: 17 + addon3_ic2: 21 -# ethernet: -# id: eth -# type: W5500 -# clk_pin: GPIO13 -# mosi_pin: GPIO11 -# miso_pin: GPIO12 -# cs_pin: GPIO14 -# interrupt_pin: GPIO10 -# reset_pin: GPIO9 - - -packages: - wifi: !include common/wifi.yaml - # device_base: !include common/complex_esp32_base.yaml - device_base: !include common/device_base.yaml - mqtt: !include common/mqtt_null.yaml +esphome: + name: ${disp_name} + friendly_name: "${friendly_name}" + name_add_mac_suffix: false + min_version: '2025.7.0' + project: + name: clever.6c-energy-meter-3-addons + version: "1.7" esp32: board: nodemcu-32s - -# web_server: -# port: 80 - -time: - - platform: sntp - id: sntp_time - timezone: America/Detroit - -logger: - # level: DEBUG - # logs: - # sensor: DEBUG + cpu_frequency: 240MHz + framework: + # ESPHome v2025.7.0 update to allow more than 6 SPI hardware devices on ESP-IDF + type: esp-idf spi: clk_pin: ${spi_clk} miso_pin: ${spi_miso} mosi_pin: ${spi_mosi} -sensor: -#IC1 Main - - platform: atm90e32 - cs_pin: ${ic1_main} - phase_a: - voltage: - name: ${friendly_name} [V] - id: ic1Volts - filters: - - throttle_average: 60s - accuracy_decimals: 1 - current: - name: ${friendly_name} ${ct01Name} [A] - id: ct1Amps - filters: - - or: - - delta: 2 - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - power: - name: ${friendly_name} ${ct01Name} [W] - id: ct1Watts - filters: - - or: - - delta: ${grid_watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct016} - phase_b: - power: - name: ${friendly_name} ${ct02Name} [W] - id: ct2Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct010} - phase_c: - power: - name: ${friendly_name} ${ct03Name} [W] - id: ct3Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - frequency: - name: ${friendly_name} Freq A - filters: - - or: - - delta: 0.05 - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} +packages: + wifi: !include common/wifi.yaml + device_base: !include common/device_base.yaml + mqtt: !include common/mqtt_null.yaml + #mqtt: !include common/mqtt_all.yaml + # device_base: !include common/complex_esp32_base.yaml + #common: !include circuit-setup/6chan_common.yaml -#IC2 Main - - platform: atm90e32 - cs_pin: ${ic2_main} - phase_a: - current: - name: ${friendly_name} ${ct04Name} [A] - id: ct4Amps - filters: - - or: - - delta: ${grid_watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - power: - name: ${friendly_name} ${ct04Name} [W] - id: ct4Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - gain_voltage: ${voltage_cal} - gain_ct: ${sct016} - phase_b: - power: - name: ${friendly_name} ${ct05Name} [W] - id: ct5Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_c: - power: - name: ${friendly_name} ${ct06Name} [W] - id: ct6Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - frequency: - name: ${friendly_name} Freq B - filters: - - or: - - delta: 0.05 - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} + main: !include circuit-setup/meter_sensors/6chan_main_sensor.yaml + main_status: !include circuit-setup/status_fields/6chan_main_status.yaml + #main_cal: !include circuit-setup/calibration/6chan_main_calibration.yaml + #main_offset: !include circuit-setup/calibration/6chan_main_offset_calibrations.yaml + addon1: !include circuit-setup/meter_sensors/6chan_addon1.yaml + addon1_status: !include circuit-setup/status_fields/6chan_addon1_status.yaml + # addon1_cal: !include circuit-setup/calibration/6chan_addon1_calibration.yaml + # addon1_offset: !include circuit-setup/calibration/6chan_addon1_offset_calibrations.yaml -#IC1 AddOn 1 - - platform: atm90e32 - cs_pin: ${ic1_addon1} - phase_a: - power: - name: ${friendly_name} ${ct07Name} [W] - id: ct7Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_b: - power: - name: ${friendly_name} ${ct08Name} [W] - id: ct8Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_c: - power: - name: ${friendly_name} ${ct09Name} [W] - id: ct9Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct013} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} -#IC2 AddOn 1 - - platform: atm90e32 - cs_pin: ${ic2_addon1} - phase_a: - power: - name: ${friendly_name} ${ct10Name} [W] - id: ct10Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_b: - power: - name: ${friendly_name} ${ct11Name} [W] - id: ct11Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct010} - phase_c: - power: - name: ${friendly_name} ${ct12Name} [W] - id: ct12Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} + addon2: !include circuit-setup/meter_sensors/6chan_addon2.yaml + addon2_status: !include circuit-setup/status_fields/6chan_addon2_status.yaml + # addon2_cal: !include circuit-setup/calibration/6chan_addon2_calibration.yaml + # addon2_offset: !include circuit-setup/calibration/6chan_addon2_offset_calibrations.yaml -#IC1 AddOn 2 - - platform: atm90e32 - cs_pin: ${ic1_addon2} - phase_a: - power: - name: ${friendly_name} ${ct13Name} [W] - id: ct13Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_b: - power: - name: ${friendly_name} ${ct14Name} [W] - id: ct14Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_c: - power: - name: ${friendly_name} ${ct15Name} [W] - id: ct15Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} -#IC2 AddOn 2 - - platform: atm90e32 - cs_pin: ${ic2_addon2} - phase_a: - power: - name: ${friendly_name} ${ct16Name} [W] - id: ct16Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_b: - power: - name: ${friendly_name} ${ct17Name} [W] - id: ct17Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_c: - power: - name: ${friendly_name} ${ct18Name} [W] - id: ct18Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} -#IC1 AddOn 3 - - platform: atm90e32 -#do not use GPIO2 if ESP32 has an on-board LED assigned to it - cs_pin: ${ic1_addon3} - phase_a: - power: - name: ${friendly_name} ${ct19Name} [W] - id: ct19Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_b: - power: - name: ${friendly_name} ${ct20Name} [W] - id: ct20Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - phase_c: - power: - name: ${friendly_name} ${ct21Name} [W] - id: ct21Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - qos: 1 - retain: true - availability: - topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_w/status - payload_available: online - payload_not_available: offline - state_topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_w - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} -#IC2 AddOn 3 - - platform: atm90e32 - cs_pin: ${ic2_addon3} - phase_a: - power: - #name: ${friendly_name} ${ct22Name} [W] + addon3: !include circuit-setup/meter_sensors/6chan_addon3.yaml + addon3_status: !include circuit-setup/status_fields/6chan_addon3_status.yaml + # addon3_cal: !include circuit-setup/calibration/6chan_addon3_calibration.yaml + # addon3_offset: !include circuit-setup/calibration/6chan_addon3_offset_calibrations.yaml + +# web_server: +# port: 80 + +text_sensor: + - id: !extend ${addon3_id1} + phase_status: + phase_a: internal: true - id: ct22Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct010} - phase_b: + +sensor: + ## The max value for current that the meter can output is 65.535. If you expect to measure current over 65A, + ## divide the current_cal_ctx (above) by 2 (120A CT) or 4 (200A CT) and multiply the current and power values + ## by 2 or 4, uncommenting the below and changing the id and phase_x accordingly + #- id: !extend ${main_meter_id1} # CTs 1-3 + # phase_a: # CT1 + # current: + # filters: + # - multiply: 2 + # power: + # filters: + # - multiply: 2 + # + ## uncomment if monitoring 2 voltages + #- id: !extend ${main_meter_id2} + # phase_a: + # voltage: + # name: Voltage 2 + # id: ic2Volts + # accuracy_decimals: 1 + # frequency: + # 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 + + - id: !extend ${addon3_id1} + phase_a: power: - name: ${friendly_name} ${ct23Name} [W] - id: ct23Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} + internal: true + current: + internal: true + + - id: !remove ct19Kwh + + # Dishwasher on ct21 + - id: !extend ${addon3_id1} phase_c: power: - name: ${friendly_name} ${ct24Name} [W] - id: ct24Watts - filters: - - or: - - delta: ${watt_delta} - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} - - multiply: -1 - accuracy_decimals: 1 - gain_voltage: ${voltage_cal} - gain_ct: ${sct006} - line_frequency: 60Hz - gain_pga: 1X - update_interval: ${update_time} + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct21_name}/Watts + current: + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct21_name}/Amps -#Total Amps From Grid + - id: !extend ct21Kwh + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct21_name}/kWh + + # Dryer on ct2 + - id: !extend ${main_meter_id1} + phase_b: + power: + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct2_name}/Watts + current: + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct2_name}/Amps + + - id: !extend ct2Kwh + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct2_name}/kWh + + # Washing Machine on ct18 + - id: !extend ${addon2_id2} + phase_c: + power: + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct18_name}/Watts + current: + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct18_name}/Amps + + - id: !extend ct18Kwh + qos: 0 + retain: true + state_topic: ${mqtt_root_topic}/${devicename}/sensor/${ct18_name}/kWh + + #Total Amps + ########### + # - platform: template + # name: ${friendly_name} Total Amps + # id: totalAmps + # lambda: return id(totalAmpsMain).state + id(totalAmpsAddOn1).state + id(totalAmpsAddOn2).state + id(totalAmpsAddOn3).state ; + # accuracy_decimals: 2 + # unit_of_measurement: A + # device_class: current + # update_interval: ${update_time} + + #Total Watts + ############ + # - platform: template + # name: ${friendly_name} Total Watts + # id: totalWatts + # lambda: return id(totalWattsMain).state + id(totalWattsAddOn1).state + id(totalWattsAddOn2).state + id(totalWattsAddOn3).state ; + # accuracy_decimals: 1 + # unit_of_measurement: W + # device_class: power + # update_interval: ${update_time} + + #kWh + #### + # - platform: total_daily_energy + # name: ${friendly_name} Total kWh + # power_id: totalWatts + # filters: + # - multiply: 0.001 + # unit_of_measurement: kWh + # device_class: energy + # state_class: total_increasing + + #Total A From Grid - platform: template - name: ${friendly_name} Grid Total [A] + name: Grid A id: totalAmpsFromGrid lambda: return id(ct1Amps).state + id(ct4Amps).state ; accuracy_decimals: 1 @@ -535,15 +355,15 @@ sensor: device_class: current state_class: measurement update_interval: ${update_time} - filters: - - or: - - delta: 2.0 - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} + # filters: + # - or: + # - delta: 2.0 + # - throttle_average: ${throttle_time} + # # - heartbeat: ${watt_heartbeat} -#Total Watts From Grid + #Total Watts From Grid - platform: template - name: ${friendly_name} Grid Total [W] + name: Grid W id: totalWattsFromGrid lambda: return id(ct1Watts).state + id(ct4Watts).state ; accuracy_decimals: 1 @@ -551,15 +371,15 @@ sensor: device_class: power state_class: measurement update_interval: ${update_time} - filters: - - or: - - delta: 5.0 - - throttle_average: ${throttle_time} - # - heartbeat: ${watt_heartbeat} + # filters: + # - or: + # - delta: 5.0 + # - throttle_average: ${throttle_time} + # # - heartbeat: ${watt_heartbeat} -#kWh From Grid + #kWh From Grid - platform: total_daily_energy - name: ${friendly_name} Grid [kWh] + name: Grid kWh power_id: totalWattsFromGrid filters: - multiply: 0.001 @@ -567,281 +387,3 @@ sensor: unit_of_measurement: kWh device_class: energy state_class: total_increasing - # min_save_interval: ${update_time} - -# The CT for the Well needs to be calibrated. -# In the interim, I'm using this lambda - - platform: template - name: ${friendly_name} ${ct22Name} [W] - id: ct22WattsPositive - state_class: measurement - lambda: |- - if (id(ct22Watts).state < 0){ - return 0; - } else { - return id(ct22Watts).state ; - } - accuracy_decimals: 1 - unit_of_measurement: W - icon: mdi:lightning-bolt-circle - update_interval: ${update_time} - filters: - - delta: 5.0 - # - heartbeat: ${watt_heartbeat} - -# kWh from CT1 -# This is included in the grid calculation - -# kWh from CT2 (the dryer) - - platform: total_daily_energy - name: ${friendly_name} ${ct02Name} [kWh] - power_id: ct2Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 3 - - platform: total_daily_energy - name: ${friendly_name} ${ct03Name} [kWh] - power_id: ct3Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -# kWh From CT 4 -# This is included in the Grid calculation area - -#kWh From CT 5 - - platform: total_daily_energy - name: ${friendly_name} ${ct05Name} [kWh] - power_id: ct5Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 6 - - platform: total_daily_energy - name: ${friendly_name} ${ct06Name} [kWh] - power_id: ct6Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 7 - - platform: total_daily_energy - name: ${friendly_name} ${ct07Name} [kWh] - power_id: ct7Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 8 - - platform: total_daily_energy - name: ${friendly_name} ${ct08Name} [kWh] - power_id: ct8Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 9 - - platform: total_daily_energy - name: ${friendly_name} ${ct09Name} [kWh] - power_id: ct9Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 10 - - platform: total_daily_energy - name: ${friendly_name} ${ct10Name} [kWh] - power_id: ct10Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 11 (Heat Pump) - - platform: total_daily_energy - name: ${friendly_name} ${ct11Name} [kWh] - power_id: ct11Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 12 - - platform: total_daily_energy - name: ${friendly_name} ${ct12Name} [kWh] - power_id: ct12Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 13 - - platform: total_daily_energy - name: ${friendly_name} ${ct13Name} [kWh] - power_id: ct13Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 14 - - platform: total_daily_energy - name: ${friendly_name} ${ct14Name} [kWh] - power_id: ct14Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 15 - - platform: total_daily_energy - name: ${friendly_name} ${ct15Name} [kWh] - power_id: ct15Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 16 - - platform: total_daily_energy - name: ${friendly_name} ${ct16Name} [kWh] - power_id: ct16Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 17 - - platform: total_daily_energy - name: ${friendly_name} ${ct17Name} [kWh] - power_id: ct17Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 18 - - platform: total_daily_energy - name: ${friendly_name} ${ct18Name} [kWh] - power_id: ct18Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 19 -# this is not used - # - platform: total_daily_energy - # name: ${friendly_name} ${ct19Name} [kWh] - # power_id: ct19Watts - # filters: - # - multiply: 0.001 - # - throttle_average: ${kwh_report_interval} - # unit_of_measurement: kWh - # device_class: energy - # state_class: total_increasing - # # min_save_interval: ${update_time} - -#kWh From CT 20 - - platform: total_daily_energy - name: ${friendly_name} ${ct20Name} [kWh] - power_id: ct20Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 21 - - platform: total_daily_energy - name: ${friendly_name} ${ct21Name} [kWh] - power_id: ct21Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - qos: 1 - retain: true - availability: - topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_kwh/status - payload_available: online - payload_not_available: offline - state_topic: ${mqtt_root_topic}/${devicename}/${ct21Name}_kwh - # min_save_interval: ${update_time} - -#kWh From CT 22 - - platform: total_daily_energy - name: ${friendly_name} ${ct22Name} [kWh] - power_id: ct22WattsPositive - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 23 - - platform: total_daily_energy - name: ${friendly_name} ${ct23Name} [kWh] - power_id: ct23Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} - -#kWh From CT 24 - - platform: total_daily_energy - name: ${friendly_name} ${ct24Name} [kWh] - power_id: ct24Watts - filters: - - multiply: 0.001 - unit_of_measurement: kWh - device_class: energy - state_class: total_increasing - # min_save_interval: ${update_time} diff --git a/groups.yaml b/groups.yaml index b6a898a..b210a42 100644 --- a/groups.yaml +++ b/groups.yaml @@ -398,8 +398,8 @@ all_my_speakers: entities: - media_player.front_room_hub - media_player.kitchen - - media_player.girls_room_hub - - media_player.master_bedroom_clock + - media_player.bedroom_hub + - media_player.girls_room_clock - media_player.bathroom_mini - media_player.great_room - media_player.computer_area_hub diff --git a/lovelace/appliances/dishwasher.yaml b/lovelace/appliances/dishwasher.yaml index 59ccfbb..d9d0556 100644 --- a/lovelace/appliances/dishwasher.yaml +++ b/lovelace/appliances/dishwasher.yaml @@ -2,81 +2,91 @@ title: Dishwasher path: dishwasher icon: mdi:dishwasher subview: true -type: sidebar badges: [] -cards: - - type: vertical-stack +type: sections +max_columns: 4 +sections: + - type: grid cards: - type: history-graph entities: - entity: sensor.pm_dishwasher_w - hours_to_show: 2 - - - type: vertical-stack - view_layout: - position: sidebar + name: Dishwasher Watts + grid_options: + columns: full + hours_to_show: 3 + column_span: 4 + - type: grid cards: - - type: grid - cards: - - type: tile - entity: sensor.dishwasher - name: Dishwasher - icon_tap_action: - action: navigate - navigation_path: /phone-yaml/dishwasher - tap_action: - action: navigate - navigation_path: /phone-yaml/dishwasher - show_entity_picture: true - vertical: true - - type: tile - entity: input_select.washing_machine_fun_status - name: Washing Machine - icon_tap_action: - action: navigate - navigation_path: /phone-yaml/washing-machine - tap_action: - action: navigate - navigation_path: /phone-yaml/washing-machine - show_entity_picture: true - vertical: true - - type: tile - entity: input_select.dryer_fun_status - name: Dryer - icon_tap_action: - action: navigate - navigation_path: /phone-yaml/tumble-dryer - tap_action: - action: navigate - navigation_path: /phone-yaml/tumble-dryer - show_entity_picture: true - vertical: true - - type: tile - entity: binary_sensor.keurig - icon_tap_action: - action: navigate - navigation_path: /phone-yaml/keurig - tap_action: - action: navigate - navigation_path: /phone-yaml/keurig - show_entity_picture: true - vertical: true - - type: tile - entity: binary_sensor.stove - icon_tap_action: - action: navigate - navigation_path: /phone-yaml/stove - tap_action: - action: navigate - navigation_path: /phone-yaml/stove - show_entity_picture: true - vertical: true - - type: glance - entities: - - entity: sensor.pm_dishwasher_w - name: Watts - - entity: binary_sensor.dishwasher_door_contact - - entity: input_text.dishwasher_runtime - name: Runtime - - entity: counter.dishwasher - name: Cycles \ No newline at end of file + - type: tile + grid_options: + columns: 3 + rows: 2 + entity: sensor.dishwasher + hide_state: false + vertical: true + features_position: bottom + - type: tile + grid_options: + columns: 3 + rows: 2 + entity: sensor.washing_machine + vertical: true + features_position: bottom + - type: tile + entity: sensor.tumble_dryer + vertical: true + features_position: bottom + grid_options: + columns: 3 + rows: 2 + - type: tile + entity: sensor.pm_dishwasher_w + name: Watts + vertical: true + features_position: bottom + grid_options: + columns: 3 + rows: 2 + - type: tile + entity: sensor.dishwasher_door_device_temperature + name: Door Temp + vertical: true + features_position: bottom + grid_options: + columns: 3 + rows: 2 + - type: tile + grid_options: + columns: 3 + rows: 2 + entity: number.dishwasher_run_counter + name: Counter + vertical: true + features_position: bottom + - type: tile + grid_options: + columns: 3 + rows: 2 + entity: number.dishwasher_delay_on + name: Start + vertical: true + features_position: bottom + - type: tile + entity: timer.dishwasher_off + name: End + vertical: true + features_position: bottom + grid_options: + columns: 3 + rows: 2 + - type: tile + entity: timer.dishwasher_watchdog + name: Too Long + state_content: remaining_time + vertical: true + features_position: bottom + grid_options: + columns: 3 + rows: 2 + column_span: 4 diff --git a/lovelace/cameras/view-camera-14.yaml b/lovelace/cameras/view-camera-14.yaml index e99113c..d566b05 100644 --- a/lovelace/cameras/view-camera-14.yaml +++ b/lovelace/cameras/view-camera-14.yaml @@ -76,6 +76,13 @@ card: style: left: 8% top: 95% + - type: state-icon + entity: switch.tapo_c560ws_1f31_auto_track + tap_action: + action: toggle + style: + left: 30% + top: 95% - type: state-icon entity: input_boolean.front_room_occupied tap_action: diff --git a/lovelace/cameras/view-camera-15.yaml b/lovelace/cameras/view-camera-15.yaml index ca3246a..f0125bb 100644 --- a/lovelace/cameras/view-camera-15.yaml +++ b/lovelace/cameras/view-camera-15.yaml @@ -75,6 +75,13 @@ card: style: left: 8% top: 95% + - type: state-icon + entity: switch.tapo_c560ws_1f8d_auto_track + tap_action: + action: toggle + style: + left: 30% + top: 95% - type: state-icon entity: sensor.great_room_person_count style: diff --git a/lovelace/details/view-power-breaker.yaml b/lovelace/details/view-power-breaker.yaml index 4da21d1..0e5a8ff 100644 --- a/lovelace/details/view-power-breaker.yaml +++ b/lovelace/details/view-power-breaker.yaml @@ -20,11 +20,11 @@ cards: - type: custom:mushroom-title-card title: Current Live Totals - type: custom:mushroom-title-card - title: "{{states('sensor.pm_grid_total_a')}} A" + title: "{{states('sensor.pm_grid_a')|float(default=0)|round(2) }} A" - type: custom:mushroom-title-card - title: "{{states('sensor.pm_grid_total_w')}} W" + title: "{{states('sensor.pm_grid_w')|float(default=0)|round(2) }} W" - type: custom:mushroom-title-card - title: "{{states('sensor.pm_grid_kwh')}} kWh" + title: "{{states('sensor.pm_grid_kwh')|float(default=0)|round(2) }} kWh" - type: horizontal-stack cards: - type: vertical-stack diff --git a/lovelace/frigate/view-ai-cam15.yaml b/lovelace/frigate/view-ai-cam15.yaml index f59fc44..13fcee8 100644 --- a/lovelace/frigate/view-ai-cam15.yaml +++ b/lovelace/frigate/view-ai-cam15.yaml @@ -1,6 +1,6 @@ title: AI Cam15 path: ai-cam15 -icon: mdi:desktop-classic +icon: mdi:microsoft-xbox-controller type: sidebar visible: - user: 24a4bd075e7f41a497dd0390a1dd4a9f diff --git a/lovelace/phone/girls-room.yaml b/lovelace/phone/girls-room.yaml index 7532483..490ca7f 100644 --- a/lovelace/phone/girls-room.yaml +++ b/lovelace/phone/girls-room.yaml @@ -308,7 +308,7 @@ cards: - type: horizontal-stack cards: - type: custom:mini-media-player - entity: media_player.girls_room_hub + entity: media_player.girls_room_clock artwork: cover-fit - type: vertical-stack cards: diff --git a/lovelace/phone/master-bedroom.yaml b/lovelace/phone/master-bedroom.yaml index c482bad..29e731e 100644 --- a/lovelace/phone/master-bedroom.yaml +++ b/lovelace/phone/master-bedroom.yaml @@ -90,7 +90,7 @@ cards: - type: horizontal-stack cards: - type: custom:mini-media-player - entity: media_player.master_bedroom_clock + entity: media_player.bedroom_hub artwork: cover-fit - type: vertical-stack cards: diff --git a/lovelace/room_cards/girls_room.yaml b/lovelace/room_cards/girls_room.yaml index 07f0d00..6fd0866 100644 --- a/lovelace/room_cards/girls_room.yaml +++ b/lovelace/room_cards/girls_room.yaml @@ -164,7 +164,7 @@ elements: #button #5 - type: "custom:button-card" color: auto - entity: media_player.girls_room_hub + entity: media_player.girls_room_clock show_name: false show_entity_picture: true style: diff --git a/lovelace/room_cards/master_bedroom.yaml b/lovelace/room_cards/master_bedroom.yaml index a39003f..69c9ac7 100644 --- a/lovelace/room_cards/master_bedroom.yaml +++ b/lovelace/room_cards/master_bedroom.yaml @@ -163,7 +163,7 @@ elements: #button #5 - type: "custom:button-card" color: auto - entity: media_player.master_bedroom_clock + entity: media_player.bedroom_hub show_name: false show_entity_picture: true style: diff --git a/lovelace/templates/card-mini-media-player.yaml b/lovelace/templates/card-mini-media-player.yaml index 415ea3b..a551a39 100644 --- a/lovelace/templates/card-mini-media-player.yaml +++ b/lovelace/templates/card-mini-media-player.yaml @@ -33,7 +33,7 @@ shortcuts: icon: mdi:home-floor-b - name: Nursery type: source - id: girls_room_hub + id: girls_room_clock icon: mdi:teddy-bear - name: Timeless type: playlist diff --git a/lovelace/view-cameras.yaml b/lovelace/view-cameras.yaml index 6aa4686..33273b7 100644 --- a/lovelace/view-cameras.yaml +++ b/lovelace/view-cameras.yaml @@ -13,7 +13,7 @@ cards: - !include /config/lovelace/cameras/view-camera-12.yaml - !include /config/lovelace/cameras/view-camera-14.yaml - !include /config/lovelace/cameras/view-camera-03.yaml - - !include /config/lovelace/cameras/view-camera-04.yaml + - !include /config/lovelace/cameras/view-camera-15.yaml - !include /config/lovelace/cameras/view-camera-08.yaml - !include /config/lovelace/cameras/view-camera-01.yaml - !include /config/lovelace/cameras/view-camera-06.yaml diff --git a/lovelace/view-ha-floorplan.yaml b/lovelace/view-ha-floorplan.yaml index c863351..fc3391b 100644 --- a/lovelace/view-ha-floorplan.yaml +++ b/lovelace/view-ha-floorplan.yaml @@ -64,6 +64,7 @@ cards: - input_boolean.deck_occupied - input_boolean.front_porch_occupied - input_boolean.furnace_room_occupied + - input_boolean.deck_occupied states: - state: "on" @@ -133,6 +134,8 @@ cards: - binary_sensor.great_room_person_occupancy - binary_sensor.kitchen_person_occupancy - binary_sensor.master_bedroom_person_occupancy + - binary_sensor.downstairs_person_occupancy + - binary_sensor.upstairs_person_occupancy - binary_sensor.girls_room_person_occupancy - binary_sensor.utility_room_person_occupancy - binary_sensor.utility_room_person_occupancy @@ -287,9 +290,9 @@ cards: - media_player.garage - media_player.great_room - media_player.kitchen - - media_player.master_bedroom_clock + - media_player.girls_room_clock - media_player.front_room_hub - - media_player.girls_room_hub + - media_player.bedroom_hub - media_player.boys_room_clock - media_player.ma_home_assistant_voice_097b44_media_player states: @@ -816,6 +819,7 @@ cards: - camera.frigate_cam08 - camera.frigate_cam12 - camera.frigate_cam14 + - camera.frigate_cam15 - camera.frigate_cam18 - camera.frigate_cam19 states: diff --git a/lovelace/view-media.yaml b/lovelace/view-media.yaml index dd99ac3..b3f2578 100644 --- a/lovelace/view-media.yaml +++ b/lovelace/view-media.yaml @@ -55,16 +55,8 @@ cards: artwork: cover show_source: true - - entity: media_player.girls_room_hub - name: Nursery - #type: media-control - type: custom:mini-media-player - group: true - artwork: cover - show_source: true - - - entity: media_player.master_bedroom_clock - name: Master Bedroom + - entity: media_player.girls_room_clock + name: Girls Room #type: media-control type: custom:mini-media-player group: true @@ -79,6 +71,14 @@ cards: artwork: cover show_source: true + - entity: media_player.bedroom_hub + name: Bedroom + #type: media-control + type: custom:mini-media-player + group: true + artwork: cover + show_source: true + - entity: media_player.computer_area_hub name: Computer Area #type: media-control @@ -291,10 +291,10 @@ cards: # id: great_room # - name: Nursery # type: source - # id: girls_room_hub + # id: girls_room_clock # - name: Master Bedroom # type: source - # id: master_bedroom_clock + # id: bedroom_hub # - name: Front Room # type: source # id: front_room_hub diff --git a/lovelace/view-overview.yaml b/lovelace/view-overview.yaml index 1c97aaf..c8847fc 100644 --- a/lovelace/view-overview.yaml +++ b/lovelace/view-overview.yaml @@ -1255,8 +1255,8 @@ cards: - entity: media_player.garage - entity: media_player.great_room - entity: media_player.kitchen - - entity: media_player.master_bedroom_clock - - entity: media_player.girls_room_hub + - entity: media_player.bedroom_hub + - entity: media_player.girls_room_clock - entity: device_tracker.amcrest_technologies_24_1f_27 name: MBR Left icon: mdi:cctv diff --git a/lovelace/view-power-breaker copy.yaml b/lovelace/view-power-breaker copy.yaml index c1c9217..cd7ea6a 100644 --- a/lovelace/view-power-breaker copy.yaml +++ b/lovelace/view-power-breaker copy.yaml @@ -15,7 +15,7 @@ cards: image: /local/background100.png elements: - type: state-label - entity: sensor.pm_grid_total_w + entity: sensor.pm_grid_w style: font-size: 300% left: 50% @@ -40,7 +40,7 @@ cards: update_interval: 30 group: true entities: - - entity: sensor.pm_grid_total_w + - entity: sensor.pm_grid_w show: icon: false name: false @@ -88,7 +88,7 @@ cards: update_interval: 30 group: true entities: - - entity: sensor.pm_grid_total_w + - entity: sensor.pm_grid_w show: icon: false name: false diff --git a/lovelace/view-power.yaml b/lovelace/view-power.yaml index 306645b..7feecaa 100644 --- a/lovelace/view-power.yaml +++ b/lovelace/view-power.yaml @@ -12,7 +12,7 @@ cards: cards: - type: entities entities: - - entity: sensor.pm_grid_total_w + - entity: sensor.pm_grid_w name: Grid [W] - entity: sensor.pm_grid_kwh name: Grid [kWh] diff --git a/scripts/cameras/cam03_computer_area.yaml b/scripts/cameras/cam03_computer_area.yaml index a3758b9..a4b40ee 100644 --- a/scripts/cameras/cam03_computer_area.yaml +++ b/scripts/cameras/cam03_computer_area.yaml @@ -1,9 +1,9 @@ -alias: Cam03 on Computer Area Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.computer_area_hub - url: rtsp_cam03 - force: true - extra: - mode: webrtc +# alias: Cam03 on Computer Area Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.computer_area_hub +# url: rtsp_cam03 +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam03_sub_computer_area.yaml b/scripts/cameras/cam03_sub_computer_area.yaml index 9d9828e..9ff2416 100644 --- a/scripts/cameras/cam03_sub_computer_area.yaml +++ b/scripts/cameras/cam03_sub_computer_area.yaml @@ -1,9 +1,9 @@ -alias: Cam03_sub on Computer Area Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.computer_area_hub - url: cam03_sub - force: true - extra: - mode: webrtc +# alias: Cam03_sub on Computer Area Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.computer_area_hub +# url: cam03_sub +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam08_computer_area.yaml b/scripts/cameras/cam08_computer_area.yaml index 4883aba..69a8adf 100644 --- a/scripts/cameras/cam08_computer_area.yaml +++ b/scripts/cameras/cam08_computer_area.yaml @@ -1,8 +1,8 @@ -alias: Cam08 on Computer Area Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.computer_area_hub - url: cam08_sub - extra: - mode: webrtc +# alias: Cam08 on Computer Area Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.computer_area_hub +# url: cam08_sub +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam08_front_room.yaml b/scripts/cameras/cam08_front_room.yaml index fc0112a..96b4e30 100644 --- a/scripts/cameras/cam08_front_room.yaml +++ b/scripts/cameras/cam08_front_room.yaml @@ -1,9 +1,9 @@ -alias: Cam08 on Front Room Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.front_room_hub - url: cam08_sub - force: true - extra: - mode: webrtc +# alias: Cam08 on Front Room Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.front_room_hub +# url: cam08_sub +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam13_computer_area.yaml b/scripts/cameras/cam13_computer_area.yaml index 9913142..25cb328 100644 --- a/scripts/cameras/cam13_computer_area.yaml +++ b/scripts/cameras/cam13_computer_area.yaml @@ -1,9 +1,9 @@ -alias: Cam13 on Computer Area Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.computer_area_hub - url: cam13_sub - force: true - extra: - mode: webrtc +# alias: Cam13 on Computer Area Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.computer_area_hub +# url: cam13_sub +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam13_front_room.yaml b/scripts/cameras/cam13_front_room.yaml index de102b8..082121f 100644 --- a/scripts/cameras/cam13_front_room.yaml +++ b/scripts/cameras/cam13_front_room.yaml @@ -1,9 +1,9 @@ -alias: Cam13 on Front Room Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.front_room_hub - url: cam13_sub - force: true - extra: - mode: webrtc +# alias: Cam13 on Front Room Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.front_room_hub +# url: cam13_sub +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam19_computer_area.yaml b/scripts/cameras/cam19_computer_area.yaml index a65278f..6191013 100644 --- a/scripts/cameras/cam19_computer_area.yaml +++ b/scripts/cameras/cam19_computer_area.yaml @@ -1,9 +1,9 @@ -alias: Cam19 on Computer Area Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.computer_area_hub - url: rtsp://192.168.1.7:8554/cam19_sub - force: true - extra: - mode: webrtc +# alias: Cam19 on Computer Area Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.computer_area_hub +# url: rtsp://192.168.1.7:8554/cam19_sub +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/cam19_front_room.yaml b/scripts/cameras/cam19_front_room.yaml index 82409ff..4b52b8c 100644 --- a/scripts/cameras/cam19_front_room.yaml +++ b/scripts/cameras/cam19_front_room.yaml @@ -1,9 +1,9 @@ -alias: Cam19 on Front Room Hub -sequence: - - action: webrtc.dash_cast - data: - entity_id: media_player.front_room_hub - url: cam19_sub - force: true - extra: - mode: webrtc +# alias: Cam19 on Front Room Hub +# sequence: +# - action: webrtc.dash_cast +# data: +# entity_id: media_player.front_room_hub +# url: cam19_sub +# force: true +# extra: +# mode: webrtc diff --git a/scripts/cameras/create_camera_link.yaml b/scripts/cameras/create_camera_link.yaml index 859de55..2a48364 100644 --- a/scripts/cameras/create_camera_link.yaml +++ b/scripts/cameras/create_camera_link.yaml @@ -1,17 +1,17 @@ -alias: Create temporary camera link -sequence: - - variables: - link_id: "{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}" +# alias: Create temporary camera link +# sequence: +# - variables: +# link_id: "{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}" - - action: webrtc.create_link - data: - link_id: "{{ link_id }}" # create a random or permanent link ID - # url: rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0 - # entity: camera.sonoff # you can use camera entity_id or url - url: rtsp://192.168.1.7:8554/cam03_sub - open_limit: 1 # how many times a link can be opened (0 - unlimit, 1 - default) - time_to_live: 60 # how many seconds will the link live (0 - unlimit, 60 - default) +# - action: webrtc.create_link +# data: +# link_id: "{{ link_id }}" # create a random or permanent link ID +# # url: rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0 +# # entity: camera.sonoff # you can use camera entity_id or url +# url: rtsp://192.168.1.7:8554/cam03_sub +# open_limit: 1 # how many times a link can be opened (0 - unlimit, 1 - default) +# time_to_live: 60 # how many seconds will the link live (0 - unlimit, 60 - default) - - action: persistent_notification.create - data: - message: 'Open Camera' +# - action: persistent_notification.create +# data: +# message: 'Open Camera' diff --git a/scripts/house_alert.yaml b/scripts/house_alert.yaml index c042106..b29ea91 100644 --- a/scripts/house_alert.yaml +++ b/scripts/house_alert.yaml @@ -2,19 +2,19 @@ alias: House alert sequence: - action: media_player.turn_on data: - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub - action: media_player.volume_set data: - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub volume_level: 0.5 - action: media_player.play_media data: - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub media_content_id: http://192.168.1.11:8123/local/audio/alarms/Alarm_Clock.mp3 media_content_type: music - delay: "00:00:10" # Wait for it to stop playing (5 second audio clip) - - wait_template: "{{ is_state('media_player.master_bedroom_clock','idle') }}" + - wait_template: "{{ is_state('media_player.bedroom_hub','idle') }}" timeout: "00:00:06" continue_on_timeout: "true" # Send an audio alert @@ -22,15 +22,15 @@ sequence: target: entity_id: tts.google_translate_en_com data: - media_player_entity_id: media_player.master_bedroom_clock + media_player_entity_id: media_player.bedroom_hub message: >- {{ (expand('binary_sensor.exterior_doors') | selectattr('state', 'eq', 'off')) | map(attribute='name') | list }} - delay: "00:00:02" # Wait for it to stop playing (2 minute timeout) - - wait_template: "{{ is_state('media_player.master_bedroom_clock','idle') }}" + - wait_template: "{{ is_state('media_player.bedroom_hub','idle') }}" timeout: "00:02:00" continue_on_timeout: "true" # Turn off the media players - action: media_player.turn_off data: - entity_id: media_player.master_bedroom_clock + entity_id: media_player.bedroom_hub diff --git a/scripts/master_bedroom/wake_up_the_master_bedroom.yaml b/scripts/master_bedroom/wake_up_the_master_bedroom.yaml index e2dc734..81fef3d 100644 --- a/scripts/master_bedroom/wake_up_the_master_bedroom.yaml +++ b/scripts/master_bedroom/wake_up_the_master_bedroom.yaml @@ -14,7 +14,7 @@ sequence: - action: media_player.volume_set target: # entity_id: media_player.ma_home_assistant_voice_097b44_media_player - entity_id: media_player.ma_master_bedroom_clock + entity_id: media_player.ma_bedroom_hub data: volume_level: "{{iif(volume>1,1,volume)}}" @@ -23,7 +23,7 @@ sequence: entity_id: tts.google_translate_en_com data: # media_player_entity_id: media_player.ma_home_assistant_voice_097b44_media_player - media_player_entity_id: media_player.ma_master_bedroom_clock + media_player_entity_id: media_player.ma_bedroom_hub #message: "Pick up the kids at 7 for Donuts with Dads! Its {{ now().strftime('%-I:%M %p') }} so you need to get out of bed and get ready for work and get the kids ready for school" message: "You have {{ states('todo.local_to_do') }} items on your daily task list: {{ local_todo['todo.local_to_do']['items'] | map(attribute='summary') | list | join(', ') }}" diff --git a/scripts/people/all_kids_youtube_music.yaml b/scripts/people/all_kids_youtube_music.yaml index 11466f1..a238c6d 100644 --- a/scripts/people/all_kids_youtube_music.yaml +++ b/scripts/people/all_kids_youtube_music.yaml @@ -4,7 +4,7 @@ icon: mdi:music sequence: - action: media_player.select_source data: - source: girls_room_hub + source: girls_room_clock entity_id: media_player.ytube_music_player - action: media_player.shuffle_set data: diff --git a/scripts/people/goodnight_kids_youtube_music.yaml b/scripts/people/goodnight_kids_youtube_music.yaml index d84ef61..4019244 100644 --- a/scripts/people/goodnight_kids_youtube_music.yaml +++ b/scripts/people/goodnight_kids_youtube_music.yaml @@ -4,7 +4,7 @@ icon: mdi:music sequence: - action: media_player.select_source data: - source: girls_room_hub + source: girls_room_clock entity_id: media_player.ytube_music_player - action: media_player.shuffle_set data: diff --git a/ui-cameras.yaml b/ui-cameras.yaml index e449de7..4358cdd 100644 --- a/ui-cameras.yaml +++ b/ui-cameras.yaml @@ -6,16 +6,13 @@ views: - !include lovelace/view-surveillance.yaml - !include lovelace/view-cameras.yaml - !include lovelace/frigate/view-ai-cam08.yaml + - !include lovelace/frigate/view-ai-cam01.yaml - !include lovelace/frigate/view-ai-cam12.yaml - !include lovelace/frigate/view-ai-cam14.yaml - - !include lovelace/frigate/view-ai-cam15.yaml - - !include lovelace/frigate/view-ai-cam03.yaml - + - !include lovelace/frigate/view-ai-cam15.yaml - !include lovelace/frigate/view-ai-cam06.yaml - !include lovelace/frigate/view-ai-cam07.yaml - - - !include lovelace/frigate/view-ai-cam01.yaml - !include lovelace/frigate/view-ai-cam04.yaml - !include lovelace/frigate/view-ai-cam18.yaml - !include lovelace/frigate/view-ai-cam19.yaml \ No newline at end of file diff --git a/www/floorplan/fullsized_floorplan.svg b/www/floorplan/fullsized_floorplan.svg index 8500bfb..952fb94 100644 --- a/www/floorplan/fullsized_floorplan.svg +++ b/www/floorplan/fullsized_floorplan.svg @@ -38,9 +38,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.01" - inkscape:cx="29850" - inkscape:cy="41850" + inkscape:zoom="0.014142136" + inkscape:cx="52149.125" + inkscape:cy="22874.904" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -3526,6 +3526,38 @@ inkscape:label="binary_sensor.frigate_cam03_person_occupancy" transform="rotate(20.586101)" sodipodi:arc-type="slice" /> + + + + + + - inkscape:label="light.front_porch_overhead" /> + inkscape:label="media_player.bedroom_hub"> + inkscape:label="media_player.girls_room_clock"> + +