Skip to content

Commit

Permalink
floorplan
Browse files Browse the repository at this point in the history
- Add robo vacs
- Add nebula lights
- Add main bathroom temperature
- Add litterbox camera
- Add motion backgrounds
  • Loading branch information
zanix committed Nov 6, 2024
1 parent 7efe68c commit e30cede
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 56 deletions.
45 changes: 43 additions & 2 deletions lovelace/dashboards/floorplan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ views:
- type: custom:floorplan-card
full_height: true
config:
image: /local/floorplan/floorplan.svg?v=1.1.14
stylesheet: /local/floorplan/floorplan.css?v=1.1.14
image: /local/floorplan/floorplan.svg?v=2.0.0
stylesheet: /local/floorplan/floorplan.css?v=2.0.0

defaults:
hover_action: hover-info
Expand Down Expand Up @@ -256,6 +256,8 @@ views:
- name: Color Lights
entities:
- light.kitchen_island
- light.nebula_projector_ethan_light
- light.nebula_projector_emma_light
- light.amy_office
- light.joshua_office_lamp
- light.wled_joshua_office_desk
Expand Down Expand Up @@ -410,6 +412,7 @@ views:
- binary_sensor.ecobee_occupancy
- binary_sensor.kitchen_occupancy
- binary_sensor.family_room_occupancy
- binary_sensor.theater_room_motion
- binary_sensor.main_bedroom_occupancy
- binary_sensor.emma_bedroom_occupancy
- binary_sensor.ethan_bedroom_occupancy
Expand Down Expand Up @@ -494,6 +497,7 @@ views:
- sensor.kitchen_temperature
- sensor.family_room_temperature
- sensor.main_bedroom_temperature
- sensor.main_bathroom_sensor_temperature
- sensor.emma_bedroom_temperature
- sensor.ethan_bedroom_temperature
- sensor.theater_room_temperature
Expand All @@ -518,6 +522,25 @@ views:
else
return "temp-very-high-background";
- name: Robot Vac
entities:
- vacuum.r2dee2
- vacuum.dustin_mopman
state_action:
service: floorplan.class_set
service_data: |
>
if (entity.state == "cleaning")
return "vacuum-on";
else if (entity.state == "charging")
return "vacuum-charging";
else if (entity.state == "paused")
return "vacuum-paused";
else if (entity.state == "return")
return "vacuum-return";
else
return "vacuum-off";
# Cameras
- entity: camera.livingroom
state_action:
Expand Down Expand Up @@ -587,6 +610,23 @@ views:
variables:
- camera: camera.doorbell
- stream: doorbell
- entity: camera.litterbox
state_action:
service: floorplan.class_set
service_data: '${(entity.state === "recording") ? "camera-recording" : ""}'
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Litterbox
size: fullscreen
content:
type: custom:decluttering-card
template: camera_card
variables:
- camera: camera.litterbox
- stream: litterbox
- entity: camera.bambu_p1s_camera
state_action:
service: floorplan.class_set
Expand All @@ -595,6 +635,7 @@ views:
- name: Cars
entities:
- device_tracker.ascent
- device_tracker.kona_location
hover_action: false
state_action:
service: floorplan.class_set
Expand Down
28 changes: 27 additions & 1 deletion www/floorplan/floorplan.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,19 @@
100% { transform: rotate(-360deg); }
}

/* Wobbling */
@keyframes wobbling {
0% { transform: rotate(-80deg); }
100% { transform: rotate(40deg); }
}

#background {
fill: transparent;
}

/* SVG shapes */

svg, svg * {
vector-effect: non-scaling-stroke !important;
pointer-events: all !important;
transition: fill 1.5s ease, stroke 1.5s ease;
}
Expand Down Expand Up @@ -399,3 +404,24 @@ g.floorplan-long-click > :not(text):hover,
.mediaplayer-playing {
fill: var(--cyan-color) !important;
}

/* Robot vacuum */

.vacuum-off {
fill: #585959 !important;
}
.vacuum-on {
fill: var(--cyan-color) !important;
animation: wobbling 0.7s linear infinite alternate;
transform-box: fill-box;
transform-origin: center;
}
.vacuum-charging {
fill: var(--orange-color) !important;
}
.vacuum-paused {
fill: var(--yellow-color) !important;
}
.vacuum-return {
fill: var(--purple-color) !important;
}
Loading

0 comments on commit e30cede

Please sign in to comment.