-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pop ups not applying styles (HA 0.113 and browser mod 1.1.0) #117
Comments
Since so much is broken anyway, I bit the bullet and moved over to card-mod styles in 1.1.1. That means card-mod must be installed for styling to work, and that the syntax is entirely different. It's a very breaking change, but it's also much more powerful, and means popups can be styled via the theme. Good luck! |
Welp, this fixed everything for me. I wasn't modifying style of my pop up cards. So I didn't have to change anything. Updated to latest and now the cards are showing up properly. Quick turnaround is an understatement here! Thanks again |
Great change here. 1.1.1 fixed all my popup styles and everything is loading perfectly. |
Can someone post an example of how to change the width of a popup with the new card-mod? Tried this and still got a small popup
|
Try: style: |
:host .content {
width: 90vw;
height 90 vh;
} |
Here's some styles for setting height and width, making a transparent background and setting a border radius style:
$: |
.mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
border-radius: 25px;
}
.: |
:host {
--mdc-theme-surface: rgba(0,0,0,0);
--secondary-background-color: rgba(0,0,0,0.5);
--ha-card-background: rgba(0,0,0,0.5);
}
:host .content {
width: 90vw;
height: 90vh;
} |
OK, I spoke a little too soon. Pop ups work fine on my fire tablet using fully kiosk. But they don't show up at all now on my iPhone running the HA companion app, or in safari on my Mac. I restarted HA and cleared my cache in the app and in safari, but no luck. The pop ups would show up in 1.1.0, but the styling was messed up. Now I am getting nothing running 1.1.2 |
Oh look. Yet another javascript function that safari just doesn't support... I swear it's the IE6 of the 20teens... I know what the problem is, but won't have time to fix it for a few hours. |
Should work now |
After updating to 1.1.3, try adding |
i do not have browser mod in resources , i only use card mod and i do not have updates available. |
Oh! Silly me. Of course. Sorry about that. |
That has nothing to do with browser mod, but light-pop-card you use. It has been updated and no longer shows settings. You need to envoke a custom card now. See this for more information. |
Hello!
whatever style i put at the end, styling is not applied (i also tried :host). What i'm trying to do is show popup from automation when certain condition is met. EDIT: solved. I restarted my PC and for unknown reason above code start to work... |
Hmmm, I'm having a similar issue (styles not being applied). I have created an automation that throws up a pop-up card when a device changes state. (In this example, a light coming on, but the code is a placeholder for a freezer door being open, when I get around to purchasing the appropriate hardware.) Trigger (in this case) the light does in fact bring up a popup card, but none of the requested styles are applied. If anyone has any brilliant suggestions, I'd much appreciate it. Code from my automation script:
|
Hi did you figure it out? |
Hi Thomas,
Sadly, no. Actually, I did (temporarily) abandon the idea and instead used the default notification service, which actually works out a little better in my case.
I’m using (at the moment) an old iPad Air as my wall-mounted tablet. In the IOS settings, I set notifications to persist. In the HA automation, I now call a ‘send notification to the iPad companion app’ service with the appropriate message. This nicely pops up a notification on my panel, along with a nice beep as an audible attention-getter, and the message stays there (persistent notification) until I tap on it, where it dutifully disappears. The down-side is that the popup is always at the top of the screen, but I can live with that.
Going down the road, I might replace the iPad with a cheap Android tablet for the following reasons:
Waking the tablet up from a ‘deep sleep’ remotely might be easier on Android; can’t do that on the iPad
I might be able to use the tablet’s camera to automatically wake up the tablet - something iPad doesn’t support
Thanks for checking, though.
Darrell
… On Jan 22, 2024, at 10:26 PM, nochlab1 ***@***.***> wrote:
Hmmm, I'm having a similar issue (styles not being applied).
I have created an automation that throws up a pop-up card when a device changes state. (In this example, a light coming on, but the code is a placeholder for a freezer door being open, when I get around to purchasing the appropriate hardware.)
Trigger (in this case) the light does in fact bring up a popup card, but none of the requested styles are applied.
If anyone has any brilliant suggestions, I'd much appreciate it.
Code from my automation script:
id: '1680206256594'
alias: Test Popup for Light
description: Tests Popup if Light Comes On
trigger:
platform: state
entity_id:
light.landing
from: 'off'
to: 'on'
condition: []
action:
service: browser_mod.popup
data:
dismissable: true
autoclose: false
content:
type: custom:popup-card
entity: light.upstairs_alcove
title: ACTION NEEDED
card:
type: markdown
style: |
ha-card {
color: red;
width: 100%;
height: 100%;
background-color: #3C4048;
text-align: center;
padding-top: 0px;
font-size: 30px;
}
content: Alcove Light is On
size: normal
mode: single
Hi did you figure it out?
—
Reply to this email directly, view it on GitHub <#117 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAO6I2RP3XHUOYHBRQRYRILYP5CZZAVCNFSM4PHBP7UKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJQGUZTCNRYGMZA>.
You are receiving this because you commented.
|
(EDIT: I had added my request here, because it specifically refers to a comment above. But it doesn't really belong on this issue, so I opened a new one for it: #714) |
Pop ups are functioning, but style is not being applied. Also noticed on my pop ups that they are not centered on screen. Sometimes are partially off screen.
same here..... styles not applied
Originally posted by @joseska in #115 (comment)
The text was updated successfully, but these errors were encountered: