This animation is slick! Apparently I’m not smart enough this morning to make it work with my “horizontal” doors. Any tips?
Thanks!
This animation is slick! Apparently I’m not smart enough this morning to make it work with my “horizontal” doors. Any tips?
Thanks!
I had some issues with the transform origin. Try playing with that. Also for some reason I had to draw the squares to animate new after moving several items in inkscape (dunno what happened there). Also you might need 2 animations one for 90deg and one for -90/270 deg (mine just happened to be the same). If you need more specific help feel free to ask.
~Cheers
Awesome, that is the path I’m on, I’ve gotten it to do some wild stuff ha!
I remember my door just flying off all the way to the left in the floorplan with the animation. That always happened when it for some reason didn’t get the right transform origin. Redrawing of the square helped there for some reason.
~Cheers
Wow weird, redrawing the square did the trick for me as well.
I also ended up having to create a second keyframe for -90 and played with different origins for each door until I got them to “open” the correct way. This is very cool!
Wow would u mind to share your code that’s awesome
You sir deserve a Blue Peter Badge! That looks awesome!
Would you mind sharing your configuration? I want something like that
Here is the code for my fan rotation:
floorplan.css
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
}
}
#fan\.living_room_fan_level, #fan\.master_bedroom_fan_level {
transform-origin: center;
}
.fan-on {
fill: #ff8a65 !important;
-webkit-animation: rotation 2s infinite linear;
}
.fan-off {
fill: #424242 !important;
}
I’ll probably add a little more soon to make the fan spin faster with each of my assigned speeds (slow, med, fast)
I am trying to animate but see below:
I just copy paste your css:
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
}
}
#fan\.living_room_fan_level, #fan\.master_bedroom_fan_level {
transform-origin: center;
}
.fan-on {
fill: #ff8a65 !important;
-webkit-animation: rotation 2s infinite linear;
}
.fan-off {
fill: #424242 !important;
}
here is config:
- name: Fan
entities:
- switch.fan
states:
- state: 'on'
class: 'fan-on'
- state: 'off'
class: 'fan-off'
Change the following line from:
#fan\.living_room_fan_level, #fan\.master_bedroom_fan_level {
transform-origin: center;
}
to
#switch\.fan {
transform-origin: center;
}
And you should be good to go
Hmm, the entity id for that specific fan is switch.fan right?
Also make sure you have #switch\.fan
not #switch.fan
(notice the slash)
yes, slash is there.
can you please share your svg and css file?
Sure thing, I can’t upload css nor svg here, so here is a link to each in my Drive (haven’t updated my git in a long while)
I did make a couple minor changes since the last post, but mostly just house keeping
Can you share the config as i started getting error
Uncaught TypeError: Cannot read property 'indexOf' of undefined
URL: http://192.168.xx.xx:8123/local/custom_ui/floorplan/ha-floorplan.html
Line: 712, column: 33
Error: {}
you can download floorplan.yaml from following link: