Mzezman
Executive Member
- Joined
- Nov 13, 2021
- Messages
- 5,963
- Reaction score
- 3,942
His GIT has sample code for mushroom-type cards that you can then add to your own dashboardsThanks, eventually found a git doc that pointed me to having to install hacp first, and then using that install mushroom.
and now i installed Werners app and not even using the Mushrooms, ehehe
anyone by any change got a dashboard integrated with Werners integration, exposing via fancy Mushroom front end ?
G

^ That is created using this code
YAML:
type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.load_shedding_stage_capetown
icon: ''
- type: entity
entity: sensor.load_shedding_stage_eskom
icon: ''
- type: entity
entity: sensor.load_shedding_area_eskde_14_milnertoncityofcapetownwesterncape
icon: ''
- type: template
content: '{{state_attr(entity, "count")}}/{{state_attr(entity, "limit")}}'
entity: sensor.load_shedding_sepush_quota
icon: mdi:api
tap_action:
action: more-info
alignment: center
- type: markdown
content: >
{% set stage_sensor = "sensor.load_shedding_stage_eskom" %}
{% set area_sensor =
"sensor.load_shedding_area_eskde_14_milnertoncityofcapetownwesterncape"
%}
{% set area_schedule = state_attr(area_sensor, "forecast") %}
{% if area_schedule %}
{% set start_time = area_schedule[0].start_time %}
{% set end_time = area_schedule[0].end_time %}
{% if is_state(area_sensor, "off") %}
{% set starts_in = timedelta(minutes=state_attr(area_sensor, "starts_in")).total_seconds() | int // 60 %}
{% set mins = starts_in % 60 %}
{% set hrs = starts_in // 60 % 24 %}
{% set days = starts_in // 1440 %}
{% set alert = "Load Shedding starts in {d}d {h}h {m}m ({next})".format(d=days, m=mins, h=hrs, next=as_timestamp(start_time) | timestamp_custom("%H:%M", True)) %}
{% if starts_in > 1440 %}
<ha-alert alert-type="success">{{ states(stage_sensor) }}</ha-alert>
{% elif 60 < starts_in <= 1440 %}
<ha-alert alert-type="warning">{{ alert }}</ha-alert>
{% else %}
<ha-alert alert-type="error">{{ alert }}</ha-alert>
{% endif %}
{% else %}
{% set ends_in = timedelta(minutes=state_attr(area_sensor, "ends_in")).total_seconds() | int // 60 %}
{% set mins = ends_in % 60 %}
{% set hrs = ends_in // 60 % 24 %}
{% set days = ends_in // 1440 %}
{% set alert = "Load Shedding ends in {d}d {h}h {m}m ({next})".format(d=days, m=mins, h=hrs, next=as_timestamp(end_time) | timestamp_custom("%H:%M", True)) %}
<ha-alert alert-type="error">{{ alert }}</ha-alert>
{% endif %}
{% else %}
{% set stage = state_attr(stage_sensor, "next_stage") %}
{% set start_time = state_attr(stage_sensor, "next_start_time") %}
{% set end_time = state_attr(stage_sensor, "next_end_time") %}
{% set starts_in = timedelta(minutes=state_attr(stage_sensor, "starts_in")).total_seconds() | int // 60 %}
{% set mins = starts_in % 60 %}
{% set hrs = starts_in // 60 % 24 %}
{% set days = starts_in // 1440 %}
{% if (start_time == 0 or end_time == 0) %}
{% set alert = "No Load Shedding" %}
{% else %}
{% set alert = "Stage {stage} starts in {d}d {h}h {m}m ({next})".format(stage=stage, d=days, m=mins, h=hrs, next=as_timestamp(start_time) | timestamp_custom("%H:%M", True)) %}
{% endif %}
<ha-alert alert-type="success">{{ alert }}</ha-alert>
{% endif %}
- type: custom:atomic-calendar-revive
enableModeChange: true
firstDayOfWeek: 1
refreshInterval: 1800
entities:
- calendar.load_shedding_forecast
showCurrentEventLine: false
showMonth: true
showWeekDay: true
disableEventLink: true
showNoEventsForToday: true
disableLocationLink: true
showFullDayProgress: false
showEventIcon: false
showHiddenText: false
showCalendarName: false
calShowDescription: false
showLastCalendarWeek: true
disableCalEventLink: true
disableCalLocationLink: true
disableCalLink: true
showDescription: false
dateFormat: LL
showDate: false
sortByStartTime: false
showRelativeTime: true
showProgressBar: true
showLocation: true
showDeclined: true
showMultiDayEventParts: false
showMultiDay: false
showLoader: false
maxDaysToShow: 3



