From 9e94ed29d364d4f03ea5d39f902d6cce9cf81325 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Wed, 1 Dec 2021 14:05:10 +0200 Subject: [PATCH] migrate to zwavejs --- config/configuration.yaml | 7 +-- .../lovelace/advanced_dashboard/01_new.yaml | 2 +- .../home_dashboard/bedroom_dashboard.yaml | 4 +- .../home_dashboard/hallway_dashboard.yaml | 6 ++ .../home_dashboard/preferences_dashboard.yaml | 19 +++--- config/lovelace/popup_cards.yaml | 29 +++++++-- .../devices/living_room/wallmote.yaml | 60 +++++++++---------- config/packages/modules/presence.yaml | 4 -- config/packages/sensors/motion.yaml | 4 +- 9 files changed, 76 insertions(+), 59 deletions(-) diff --git a/config/configuration.yaml b/config/configuration.yaml index e115b71..a189ec9 100644 --- a/config/configuration.yaml +++ b/config/configuration.yaml @@ -96,6 +96,8 @@ ffmpeg: # https://www.home-assistant.io/integrations/frontend frontend: themes: !include_dir_merge_named themes + extra_module_url: + - /hacsfiles/lovelace-card-mod/card-mod.js # https://www.home-assistant.io/integrations/calendar.google # google: @@ -153,8 +155,3 @@ media_extractor: # https://www.home-assistant.io/integrations/mobile_app mobile_app: - -# https://www.home-assistant.io/docs/z-wave/installation/ -zwave: - usb_path: /dev/ttyACM0 - # device_config: !include zwave_device_config.yaml diff --git a/config/lovelace/advanced_dashboard/01_new.yaml b/config/lovelace/advanced_dashboard/01_new.yaml index 82f76da..7a2f20a 100644 --- a/config/lovelace/advanced_dashboard/01_new.yaml +++ b/config/lovelace/advanced_dashboard/01_new.yaml @@ -96,7 +96,7 @@ cards: - type: "custom:mini-graph-card" entities: - sensor.living_room_radiator_temperature - - sensor.trisensor_temperature + - sensor.multisensor_6_temperature cache: false group_by: hour hours_to_show: 72 diff --git a/config/lovelace/home_dashboard/bedroom_dashboard.yaml b/config/lovelace/home_dashboard/bedroom_dashboard.yaml index e472074..639070c 100644 --- a/config/lovelace/home_dashboard/bedroom_dashboard.yaml +++ b/config/lovelace/home_dashboard/bedroom_dashboard.yaml @@ -47,14 +47,14 @@ state_display: "[[[return entity.state.split(' ')[0] + ' pm2.5']]]" variables: state_size: "11px" + - type: horizontal-stack + cards: - type: custom:button-card template: v3_badge_icon entity: binary_sensor.bedroom_left_window - type: custom:button-card template: v3_badge_icon entity: binary_sensor.bedroom_right_window - - type: horizontal-stack - cards: - type: custom:button-card template: v3_badge_icon entity: binary_sensor.bedroom_door diff --git a/config/lovelace/home_dashboard/hallway_dashboard.yaml b/config/lovelace/home_dashboard/hallway_dashboard.yaml index 235675b..08b354c 100644 --- a/config/lovelace/home_dashboard/hallway_dashboard.yaml +++ b/config/lovelace/home_dashboard/hallway_dashboard.yaml @@ -34,9 +34,15 @@ - type: custom:button-card template: v3_badge_humidity entity: sensor.hallway_weather_humidity + - type: custom:button-card + template: v3_badge_icon + entity: group.hallway_motion - type: custom:button-card template: v3_badge_icon entity: binary_sensor.hallway_motion_occupancy + - type: custom:button-card + template: v3_badge_icon + entity: binary_sensor.trisensor_home_security_motion_detection - type: custom:button-card template: v3_badge_icon entity: binary_sensor.front_door diff --git a/config/lovelace/home_dashboard/preferences_dashboard.yaml b/config/lovelace/home_dashboard/preferences_dashboard.yaml index 8f67699..a75ea41 100644 --- a/config/lovelace/home_dashboard/preferences_dashboard.yaml +++ b/config/lovelace/home_dashboard/preferences_dashboard.yaml @@ -67,13 +67,8 @@ name: Speech - type: custom:button-card template: v3_button - entity: input_select.bedroom_mode - name: Bedroom - tap_action: - action: call-service - service: input_select.select_next - service_data: - entity_id: input_select.bedroom_mode + entity: input_boolean.simulation_mode + name: Simulation - type: horizontal-stack cards: @@ -88,8 +83,14 @@ name: Mercury - type: custom:button-card template: v3_button - entity: input_boolean.simulation_mode - name: Simulation + entity: input_select.bedroom_mode + name: Bedroom + tap_action: + action: call-service + service: input_select.select_next + service_data: + entity_id: input_select.bedroom_mode + - type: horizontal-stack cards: - type: custom:button-card diff --git a/config/lovelace/popup_cards.yaml b/config/lovelace/popup_cards.yaml index 11dfdf0..45f605f 100644 --- a/config/lovelace/popup_cards.yaml +++ b/config/lovelace/popup_cards.yaml @@ -26,7 +26,7 @@ binary_sensor.kitchen_motion_occupancy: entities: - entity: sensor.kitchen_motion_illuminance -binary_sensor.hallway_motion_occupancy: +group.hallway_motion: title: Hallway motion card: type: vertical-stack @@ -177,7 +177,7 @@ sensor.active_motion_sensors: - margin-left: 8px - type: custom:button-card template: [v3_button, v3_popup_button] - entity: binary_sensor.trisensor_motion + entity: binary_sensor.trisensor_home_security_motion_detection name: Hallway - type: custom:button-card template: [v3_button, v3_popup_button] @@ -633,8 +633,29 @@ vacuum.vacuum: subtitle: Cleaning time - type: custom:xiaomi-vacuum-map-card entity: vacuum.vacuum - camera_calibration: true - map_camera: camera.xiaomi_cloud_map_extractor + map_source: + camera: camera.xiaomi_cloud_map_extractor + calibration_source: + camera: true + map_locked: true + map_modes: + - template: vacuum_clean_zone + - template: vacuum_goto + - template: vacuum_follow_path + - template: vacuum_clean_segment + name: Rooms + predefined_selections: + - zones: [[25457, 25178], [27053, 25119], [27053, 27779], [24334, 27839], [24334, 25533], [25398, 25474]] + id: 1 + label: + text: "Kitchen" + x: 25457 + y: 25178 + offset_y: 35 + icon: + name: "mdi:chef-hat" + x: 25457 + y: 25178 switch.tapo_bedroom: title: "Bedroom Camera" diff --git a/config/packages/devices/living_room/wallmote.yaml b/config/packages/devices/living_room/wallmote.yaml index c964612..5476b61 100644 --- a/config/packages/devices/living_room/wallmote.yaml +++ b/config/packages/devices/living_room/wallmote.yaml @@ -2,12 +2,12 @@ automation: - alias: Wallmote · Living room · 1 · Tap · Toggle lights trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 1 - scene_data: 0 + value: "KeyPressed" + property: "scene" + property_key: "001" action: - service: light.toggle entity_id: light.living_room @@ -15,12 +15,12 @@ automation: - alias: Wallmote · Living room · 1 · Toggle · PC Light trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 1 - scene_data: 1 + value: "KeyReleased" + property: "scene" + property_key: "001" action: - service: light.toggle entity_id: light.pc @@ -28,12 +28,12 @@ automation: - alias: Wallmote · Living room · 2 · Tap · Toggle Music trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 2 - scene_data: 0 + value: "KeyPressed" + property: "scene" + property_key: "002" action: - service: media_player.media_play_pause entity_id: media_player.living_room @@ -41,24 +41,23 @@ automation: - alias: Wallmote · Living room · 2 · Hold · Play music trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 2 - scene_data: 1 + value: "KeyReleased" + property: "scene" + property_key: "002" action: - service: script.music_play - alias: Wallmote · Living room · 3 · Tap · Toggle Main lights trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 3 - scene_data: 0 + value: "KeyPressed" + property_key: "003" action: - service: light.toggle entity_id: @@ -68,12 +67,11 @@ automation: - alias: Wallmote · Living room · 3 · Hold · Toggle Ambient lights trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 3 - scene_data: 1 + value: "KeyReleased" + property_key: "003" action: - service: light.toggle entity_id: light.living_room_ambient @@ -81,23 +79,21 @@ automation: - alias: Wallmote · Living room · 4 · Tap · Toggle AC trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 4 - scene_data: 0 + value: "KeyPressed" + property_key: "004" action: - service: script.toshiba_ac_toggle - alias: Wallmote · Living room · 4 · Hold · Toggle Cover trigger: platform: event - event_type: zwave.scene_activated + event_type: zwave_js_value_notification event_data: - entity_id: zwave.aeon_labs_zw130_wallmote_quad node_id: 5 - scene_id: 4 - scene_data: 1 + value: "KeyReleased" + property_key: "004" action: - service: script.toggle_living_room_cover diff --git a/config/packages/modules/presence.yaml b/config/packages/modules/presence.yaml index 5074d76..d2adb22 100644 --- a/config/packages/modules/presence.yaml +++ b/config/packages/modules/presence.yaml @@ -59,10 +59,6 @@ binary_sensor: {% else %} mdi:account-off-outline {% endif %} - trisensor_motion: - friendly_name: TriSensor motion - device_class: motion - value_template: "{{ is_state('sensor.trisensor_burglar', '8') }}" multisensor_motion: friendly_name: MultiSensor motion diff --git a/config/packages/sensors/motion.yaml b/config/packages/sensors/motion.yaml index a812cb9..4ee0257 100644 --- a/config/packages/sensors/motion.yaml +++ b/config/packages/sensors/motion.yaml @@ -5,13 +5,13 @@ group: - binary_sensor.hallway_motion_occupancy - binary_sensor.kitchen_motion_occupancy - binary_sensor.multisensor_motion - - binary_sensor.trisensor_motion + - binary_sensor.trisensor_home_security_motion_detection hallway_motion: name: Hallway Motion entities: - binary_sensor.hallway_motion_occupancy - - binary_sensor.trisensor_motion + - binary_sensor.trisensor_home_security_motion_detection binary_sensor: - platform: mqtt