Hy!
It worked until now, now the “style:” is not working.
type: picture-elements
elements:
- type: custom:button-card
entity: weather.openweathermap
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.more_info
data:
entity: binary_sensor.rain
style: |
:host {
left: 69%;
top: 11.5%;
}
ha-card {
border-width: 0px;
border-radius: 0px;
}
color: auto
show_icon: true
show_name: false
show_state: false
state:
- value: clear-night
icon: mdi:weather-night
- value: cloudy
icon: mdi:weather-cloudy
- value: exceptional
icon: mdi:sign-yield
- value: fog
icon: mdi:weather-fog
- value: hail
icon: mdi:weather-hail
- value: lightning
icon: mdi:weather-lightning
- value: lightning-rainy
icon: mdi:weather-lightning-rainy
- value: partlycloudy
icon: mdi:weather-partly-cloudy
- value: pouring
icon: mdi:weather-pouring
- value: rainy
icon: mdi:weather-rainy
- value: snowy
icon: mdi:weather-snowy
- value: snowy-rainy
icon: mdi:weather-snowy-rainy
- value: sunny
icon: mdi:weather-sunny
- value: windy
icon: mdi:weather-windy
- value: windy-variant
icon: mdi:weather-windy-variant
- value: unavailable
icon: mdi:window-close
size: 30px
styles:
card:
- height: 43px
- width: 43px
- font-size: 10px
- background-color: transparent
icon:
- margin-top: 0%
- color: |
[[[
if (states['binary_sensor.rain'].state == 'on' )
return "#f44336";
if (states['binary_sensor.rain'].state == 'unavailable' )
return "gray";
return "#44739e";
]]]
image: https://demo.home-assistant.io/stub_config/floorplan.png
Can somebody help me?
If I replace it, it works, but I can’t turn off the border.
style:
left: 69%
top: 11.5%