Data not making it after upgrading to 2022.4.0
Opened this issue · 15 comments
Hi there,
I updated Home Assistant today and it looks like the data is not making it into HA anymore.. The state of the sensor says 'connected' but the attributes are now completely missing. My wife and I really rely on your integration so I would really appreciate it if you could look. I will try and look myself and if I see the fix ill push a PR through. Thanks a bunch!
I checked the API and the data is still there so it seems like somethings changed on the HA side to cause the attributes not to come in properly
I have noticed the same issue.....
The owlet platform sensor seems to work correctly and reports connected/disconnected depending on if it is placed on the base station or not; however the attributes that normally appeared when you click on the sensor entity no longer seem to appear.
With multiple entries in the log files like below.
Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'heart_rate' when rendering '{% if states.sensor.owlet_smart_sock_xxxxxx.attributes.heart_rate and states.sensor.owlet_smart_sock_xxxxxx.attributes.heart_rate.state != "Unknown" %} {{states.sensor.owlet_smart_sock_xxxxxx.attributes.heart_rate}} {% else %} -1 {% endif %}'
Thanks for the comments so far!
The workaround that I used was to downgrade from 2022.4.1 to 2022.3.8. I did this utilizing the following command in editor: hassio ha update --version=2022.3.8
I'm hoping that someone comes up with a solution. My technical skills are not up to the task of diagnosing and fixing.
Found the issue and fixed in my own repo (RampantRedsFan/ha-sensor.owlet). Hoping that my pull will be accepted soon to reduce people's outages.
Hi RampantRedsFan
I have manually installed you repo and can confirm that it is working as intended, with all sensors appearing and pulling in correct values......great job and thankyou for your quick fix to this issue.
You're a star @RampantRedsFan. Back up and working with your updates.
Great work, such a relief because of how much we rely on this integration! Thank you @RampantRedsFan for the fix!
Hi,
Thank you for the fix in your fork @RampantRedsFan , I was about to start fixing it myself.
Anyhow, I'm having some issues:
- Using the version in this repo the entity didn't ever appear in HA.
- Using your fork, the entity appears (and the sensor too if configured) but appears as
Disconnected
an attributes values are quite strange (no values inDSN
or vitals and true inLOW INTEG READ
andSOCK DISCON ALRT
):
The sock is charging and the base is connected (I can see that info in the app too) so... are these default values until first vitals readings are taken or something is wrong?
Thanks!
Not sure about that. I tried master and got no entity nor sensor but an error log. Using yours, I got it working. Only thing, it seems to take some default values while sock is not in use. If the sock is in use, I got the right values but, when the sock is charging, it shows the values in the image on my previous comment (disconnected, charging to 0, two alarms to true and rest of values empty).
Thanks!
@RampantRedsFan yours works as well! Thank you
i thought i would shar my sock card as well
type: vertical-stack
cards:
- type: custom:stack-in-card
cards:
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Owlet Socket
icon: mdi:owl
icon_color: |-
{% set state=states('sensor.owlet_connection_state') %}
{% if state=='Connected' %}
green
{% elif state=='Disconnected' %}
amber
{% endif %}
entity: sensor.owlet_connection_state
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: more-info
secondary: |-
{% set state=states('sensor.owlet_connection_state') %}
{% if state=='Connected' %}
Connected
{% elif state=='Disconnected' %}
Disconnected
{% endif %}
card_mod:
style: |
ha-card {
--ha-card-background: none;
padding: 0px !important;
margin-left: 6px !important;
margin-top: 6px !important;
margin-bottom: 6px !important;
--ha-card-box-shadow: none;
transition: all 0s;
}
:host {
--mush-icon-border-radius: 12px;
}
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
card_mod:
style: |
ha-card {
height: 200px !important;
background: url(https://i0.wp.com/www.threelambs.ca/wp-content/uploads/2018/02/Owlet-Soc-Gen-3-3.jpg?fit=1200%2C1200&ssl=1) center / cover no-repeat !important;
--ha-card-border-radius: 0px;
--ha-card-box-shadow: none;
margin-left: 0px !important;
margin-top: 0px !important;
margin-right: 0px !important;
margin: -8px;
transition: all 0s;
}
- type: custom:stack-in-card
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
entity: sensor.owlet_charging_status
icon_color: |-
{% set state=states('sensor.owlet_charging_status') %}
{% if state=='0' %}
disabled
{% elif state=='1' %}
green
{% endif %}
icon: >-
{{ state_attr('sensor.owlet_charging_status', 'icon')
}}
content: '{{ states(''sensor.owlet_charging_status'') }}'
tap_action:
action: more-info
- type: template
entity: sensor.owlet_current_battery_level
icon_color: deep-orange
icon: >-
{{ state_attr('sensor.owlet_current_battery_level',
'icon') }}
content: '{{ (states(''sensor.owlet_current_battery_level''))}} %'
tap_action:
action: more-info
- type: template
entity: sensor.owlet_heart_rate
icon_color: pink
icon: '{{ state_attr(''sensor.owlet_heart_rate'', ''icon'') }}'
content: '{{ (states(''sensor.owlet_heart_rate''))}} BPM'
tap_action:
action: more-info
- type: template
entity: sensor.owlet_oxygen_level
icon_color: green
icon: '{{ state_attr(''sensor.owlet_oxygen_level'', ''icon'') }}'
content: '{{ (states(''sensor.owlet_oxygen_level''))}} %'
tap_action:
action: more-info
- type: template
entity: sensor.owlet_movement
icon_color: blue
icon: '{{ state_attr(''sensor.owlet_movement'', ''icon'') }}'
content: '{{ (states(''sensor.owlet_movement''))}} %'
tap_action:
action: more-info
card_mod:
style: |
.chip-container {
flex-flow: column !important;
--chip-spacing: 0px;
--chip-background: none;
--chip-box-shadow: none;
transition: all 0s;
}
card_mod:
style: |
ha-card {
position: absolute;
right: 8px;
top: 8px;
background: rgba(var(--rgb-card-background-color), 0.9);
box-shadow: none;
border-radius: 12px;
transition: all 0s;
}
card_mod:
style: |
ha-card {
border-radius: 12px;
box-shadow: none;
margin-left: 6px;
margin-right: 6px;
}
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
icon: >-
{{ state_attr('sensor.owlet_current_monitoring_status',
'icon') }}
icon_color: >-
{% set state=states('sensor.owlet_current_monitoring_status')
%}
{% if state=='True' %}
green
{% elif state=='False' %}
disabled
{% endif %}
layout: vertical
entity: sensor.owlet_current_monitoring_status
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_charging_status'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_charging_status') %}
{% if state=='0' %}
disabled
{% elif state=='1' %}
green
{% endif %}
layout: vertical
entity: sensor.owlet_charging_status
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_low_battery_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_low_battery_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_low_battery_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
primary: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_high_heart_rate_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_high_heart_rate_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_high_heart_rate_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_low_heart_rate_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_low_heart_rate_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_low_heart_rate_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
primary: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: >-
{{ state_attr('sensor.owlet_low_oxygen_level_alert', 'icon')
}}
icon_color: |-
{% set state=states('sensor.owlet_low_oxygen_level_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_low_oxygen_level_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
primary: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
card_mod:
style: |
ha-card {
background-color: rgba(207,207,196, 0.2);
}
That is a really cool card! I will be using it. Thanks for sharing!
On Sun, Feb 26, 2023 at 6:17 PM Brad @.> wrote: @RampantRedsFan https://github.com/RampantRedsFan yours works as well! Thank you i thought i would shar my sock card as well [image: image] https://user-images.githubusercontent.com/58960644/221443393-f850eec5-53ac-4e7c-bf20-85d7b0833ecd.png type: vertical-stack cards: - type: custom:stack-in-card cards: - type: custom:stack-in-card cards: - type: custom:mushroom-template-card primary: Owlet Socket icon: mdi:owl icon_color: |- {% set state=states('sensor.owlet_connection_state') %} {% if state=='Connected' %} green {% elif state=='Disconnected' %} amber {% endif %} entity: sensor.owlet_connection_state tap_action: action: more-info hold_action: action: none double_tap_action: action: more-info secondary: |- {% set state=states('sensor.owlet_connection_state') %} {% if state=='Connected' %} Connected {% elif state=='Disconnected' %} Disconnected {% endif %} card_mod: style: | ha-card { --ha-card-background: none; padding: 0px !important; margin-left: 6px !important; margin-top: 6px !important; margin-bottom: 6px !important; --ha-card-box-shadow: none; transition: all 0s; } :host { --mush-icon-border-radius: 12px; } - type: custom:stack-in-card cards: - type: custom:mushroom-template-card card_mod: style: | ha-card { height: 200px !important; background: url(https://i0.wp.com/www.threelambs.ca/wp-content/uploads/2018/02/Owlet-Soc-Gen-3-3.jpg?fit=1200%2C1200&ssl=1) center / cover no-repeat !important; --ha-card-border-radius: 0px; --ha-card-box-shadow: none; margin-left: 0px !important; margin-top: 0px !important; margin-right: 0px !important; margin: -8px; transition: all 0s; } - type: custom:stack-in-card cards: - type: custom:mushroom-chips-card chips: - type: template entity: sensor.owlet_charging_status icon_color: |- {% set state=states('sensor.owlet_charging_status') %} {% if state=='0' %} disabled {% elif state=='1' %} green {% endif %} icon: >- {{ state_attr('sensor.owlet_charging_status', 'icon') }} content: '{{ states(''sensor.owlet_charging_status'') }}' tap_action: action: more-info - type: template entity: sensor.owlet_current_battery_level icon_color: deep-orange icon: >- {{ state_attr('sensor.owlet_current_battery_level', 'icon') }} content: '{{ (states(''sensor.owlet_current_battery_level''))}} %' tap_action: action: more-info - type: template entity: sensor.owlet_heart_rate icon_color: pink icon: '{{ state_attr(''sensor.owlet_heart_rate'', ''icon'') }}' content: '{{ (states(''sensor.owlet_heart_rate''))}} BPM' tap_action: action: more-info - type: template entity: sensor.owlet_oxygen_level icon_color: green icon: '{{ state_attr(''sensor.owlet_oxygen_level'', ''icon'') }}' content: '{{ (states(''sensor.owlet_oxygen_level''))}} %' tap_action: action: more-info - type: template entity: sensor.owlet_movement icon_color: blue icon: '{{ state_attr(''sensor.owlet_movement'', ''icon'') }}' content: '{{ (states(''sensor.owlet_movement''))}} %' tap_action: action: more-info card_mod: style: | .chip-container { flex-flow: column !important; --chip-spacing: 0px; --chip-background: none; --chip-box-shadow: none; transition: all 0s; } card_mod: style: | ha-card { position: absolute; right: 8px; top: 8px; background: rgba(var(--rgb-card-background-color), 0.9); box-shadow: none; border-radius: 12px; transition: all 0s; } card_mod: style: | ha-card { border-radius: 12px; box-shadow: none; margin-left: 6px; margin-right: 6px; } - type: horizontal-stack cards: - type: custom:mushroom-template-card icon: >- {{ state_attr('sensor.owlet_current_monitoring_status', 'icon') }} icon_color: >- {% set state=states('sensor.owlet_current_monitoring_status') %} {% if state=='True' %} green {% elif state=='False' %} disabled {% endif %} layout: vertical entity: sensor.owlet_current_monitoring_status hold_action: action: more-info double_tap_action: action: more-info tap_action: action: more-info secondary: '' badge_color: '' badge_icon: '' card_mod: style: | ha-card { --ha-card-box-shadow: none; --ha-card-background: none; } - type: custom:mushroom-template-card icon: '{{ state_attr(''sensor.owlet_charging_status'', ''icon'') }}' icon_color: |- {% set state=states('sensor.owlet_charging_status') %} {% if state=='0' %} disabled {% elif state=='1' %} green {% endif %} layout: vertical entity: sensor.owlet_charging_status hold_action: action: more-info double_tap_action: action: more-info tap_action: action: more-info secondary: '' badge_color: '' badge_icon: '' card_mod: style: | ha-card { --ha-card-box-shadow: none; --ha-card-background: none; } - type: custom:mushroom-template-card icon: '{{ state_attr(''sensor.owlet_low_battery_alert'', ''icon'') }}' icon_color: |- {% set state=states('sensor.owlet_low_battery_alert') %} {% if state=='False' %} disabled {% elif state=='True' %} red {% endif %} layout: vertical entity: sensor.owlet_low_battery_alert hold_action: action: more-info double_tap_action: action: more-info tap_action: action: more-info secondary: '' badge_color: '' badge_icon: '' primary: '' card_mod: style: | ha-card { --ha-card-box-shadow: none; --ha-card-background: none; } - type: custom:mushroom-template-card icon: '{{ state_attr(''sensor.owlet_high_heart_rate_alert'', ''icon'') }}' icon_color: |- {% set state=states('sensor.owlet_high_heart_rate_alert') %} {% if state=='False' %} disabled {% elif state=='True' %} red {% endif %} layout: vertical entity: sensor.owlet_high_heart_rate_alert hold_action: action: more-info double_tap_action: action: more-info tap_action: action: more-info secondary: '' badge_color: '' badge_icon: '' card_mod: style: | ha-card { --ha-card-box-shadow: none; --ha-card-background: none; } - type: custom:mushroom-template-card icon: '{{ state_attr(''sensor.owlet_low_heart_rate_alert'', ''icon'') }}' icon_color: |- {% set state=states('sensor.owlet_low_heart_rate_alert') %} {% if state=='False' %} disabled {% elif state=='True' %} red {% endif %} layout: vertical entity: sensor.owlet_low_heart_rate_alert hold_action: action: more-info double_tap_action: action: more-info tap_action: action: more-info secondary: '' badge_color: '' badge_icon: '' primary: '' card_mod: style: | ha-card { --ha-card-box-shadow: none; --ha-card-background: none; } - type: custom:mushroom-template-card icon: >- {{ state_attr('sensor.owlet_low_oxygen_level_alert', 'icon') }} icon_color: |- {% set state=states('sensor.owlet_low_oxygen_level_alert') %} {% if state=='False' %} disabled {% elif state=='True' %} red {% endif %} layout: vertical entity: sensor.owlet_low_oxygen_level_alert hold_action: action: more-info double_tap_action: action: more-info tap_action: action: more-info secondary: '' badge_color: '' badge_icon: '' primary: '' card_mod: style: | ha-card { --ha-card-box-shadow: none; --ha-card-background: none; } card_mod: style: | ha-card { background-color: rgba(207,207,196, 0.2); } — Reply to this email directly, view it on GitHub <#13 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVK3Z5RMV726BWJ442FXITWZPQBRANCNFSM5SYG25GA . You are receiving this because you were mentioned.Message ID: @.>
-- Sent from my mobile
If you improve share it :)
I improved it a little to show when the sock is offline
type: custom:stack-in-card
cards:
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Owlet Socket
icon: mdi:owl
icon_color: |-
{% set state=states('sensor.owlet_connection_state') %}
{% if state=='Connected' %}
green
{% elif state=='Disconnected' %}
disabled
{% endif %}
entity: sensor.owlet_connection_state
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: more-info
secondary: >-
{% set state=states('sensor.owlet_connection_state') %}
{% if state=='Connected' %}
Connected {{ (states('sensor.owlet_heart_rate'))}}bpm & {{
(states('sensor.owlet_oxygen_level'))}}%
{% elif state=='Disconnected' %}
Offline
{% endif %}
card_mod:
style: |
ha-card {
--ha-card-background: none;
padding: 0px !important;
margin-left: 6px !important;
margin-top: 6px !important;
margin-bottom: 6px !important;
--ha-card-box-shadow: none;
transition: all 0s;
}
:host {
--mush-icon-border-radius: 12px;
}
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
card_mod:
style: |
ha-card {
height: 200px !important;
background: url(https://i0.wp.com/www.threelambs.ca/wp-content/uploads/2018/02/Owlet-Soc-Gen-3-3.jpg?fit=1200%2C1200&ssl=1) center / cover no-repeat !important;
--ha-card-border-radius: 0px;
--ha-card-box-shadow: none;
margin-left: 0px !important;
margin-top: 0px !important;
margin-right: 0px !important;
margin: -8px;
transition: all 0s;
}
- type: custom:stack-in-card
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
entity: sensor.owlet_charging_status
icon_color: |-
{% set state=states('sensor.owlet_charging_status') %}
{% if state=='0' %}
disabled
{% elif state=='1' %}
green
{% endif %}
icon: |-
{% set state=states('sensor.owlet_charging_status') %}
{% if state=='0' %}
mdi:battery-charging-outline
{% elif state=='1' %}
mdi:battery-charging
{% endif %}
content: ''
tap_action:
action: more-info
- type: template
entity: sensor.owlet_current_battery_level
icon_color: deep-orange
icon: >-
{% if is_state('sensor.owlet_current_battery_level',
'unknown') %}
mdi:battery-unknown
{% else %}
mdi:battery-40
{% endif %}
content: >-
{% if is_state('sensor.owlet_current_battery_level',
'unknown') %}
Offline
{% else %}
{{ (states('sensor.owlet_current_battery_level'))}} %
{% endif %}
tap_action:
action: more-info
- type: template
entity: sensor.owlet_heart_rate
icon_color: pink
icon: |-
{% if is_state('sensor.owlet_heart_rate', 'unknown') %}
mdi:heart-pulse
{% else %}
{{ state_attr('sensor.owlet_heart_rate', 'icon') }}
{% endif %}
content: |-
{% if is_state('sensor.owlet_heart_rate', 'unknown') %}
Offline
{% else %}
{{ (states('sensor.owlet_heart_rate'))}} %
{% endif %}
tap_action:
action: more-info
- type: template
entity: sensor.owlet_oxygen_level
icon_color: green
icon: '{{ state_attr(''sensor.owlet_oxygen_level'', ''icon'') }}'
content: |-
{% if is_state('sensor.owlet_oxygen_level', 'unknown') %}
Offline
{% else %}
{{ (states('sensor.owlet_oxygen_level'))}}
{% endif %}
tap_action:
action: more-info
- type: template
entity: sensor.owlet_movement
icon_color: blue
icon: '{{ state_attr(''sensor.owlet_movement'', ''icon'') }}'
content: |-
{% if is_state('sensor.owlet_movement', 'unknown') %}
Offline
{% else %}
{{ (states('sensor.owlet_movement'))}}
{% endif %}
tap_action:
action: more-info
card_mod:
style: |
.chip-container {
flex-flow: column !important;
--chip-spacing: 0px;
--chip-background: none;
--chip-box-shadow: none;
transition: all 0s;
}
card_mod:
style: |
ha-card {
position: absolute;
right: 8px;
top: 8px;
background: rgba(var(--rgb-card-background-color), 0.9);
box-shadow: none;
border-radius: 12px;
transition: all 0s;
}
card_mod:
style: |
ha-card {
border-radius: 12px;
box-shadow: none;
margin-left: 6px;
margin-right: 6px;
}
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_current_monitoring_status'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_current_monitoring_status') %}
{% if state=='True' %}
green
{% elif state=='False' %}
disabled
{% endif %}
layout: vertical
entity: sensor.owlet_current_monitoring_status
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_charging_status'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_charging_status') %}
{% if state=='0' %}
disabled
{% elif state=='1' %}
green
{% endif %}
layout: vertical
entity: sensor.owlet_charging_status
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_low_battery_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_low_battery_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_low_battery_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
primary: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_high_heart_rate_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_high_heart_rate_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_high_heart_rate_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_low_heart_rate_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_low_heart_rate_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_low_heart_rate_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
primary: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
- type: custom:mushroom-template-card
icon: '{{ state_attr(''sensor.owlet_low_oxygen_level_alert'', ''icon'') }}'
icon_color: |-
{% set state=states('sensor.owlet_low_oxygen_level_alert') %}
{% if state=='False' %}
disabled
{% elif state=='True' %}
red
{% endif %}
layout: vertical
entity: sensor.owlet_low_oxygen_level_alert
hold_action:
action: more-info
double_tap_action:
action: more-info
tap_action:
action: more-info
secondary: ''
badge_color: ''
badge_icon: ''
primary: ''
card_mod:
style: |
ha-card {
--ha-card-box-shadow: none;
--ha-card-background: none;
}
card_mod:
style: |
ha-card {
background-color: rgba(207,207,196, 0.2);
}