Chitty Service Status Pro Plus

I would like to share my Shitty Service Status Pro Plus. It might be shitty but it works!

Untitled

  1. Create shitty script “/config/get-sstatus”

Im using allestoringen.nl aka downdetector.com. Change the URL’s accordingly!

Also change/translate the messages the script is looking for in variable “$dataz”.

#!/bin/bash

[[ -z "$1" ]] && { echo "You forgot something!" ; exit 1; }

dataz=$(/usr/bin/curl -s https://allestoringen.nl/storing/"$1"/)

if [[ "$dataz" == *"Volgens gebruikersmeldingen zijn er momenteel geen problemen"* ]]
then
  echo "Operational" ; 
  exit;
elif [[ "$dataz" == *"Volgens gebruikersmeldingen zijn er momenteel mogelijk problemen"* ]]
then
  echo "Warning"
  exit;
elif [[ "$dataz" == *"Volgens gebruikersmeldingen zijn er momenteel problemen"* ]]
then
  echo "Failed"
  exit;
fi
  1. Create Shitty Sensors.

Call the script using a command_line sensor. Replace the ServiceName accordingly!

- platform: command_line
  name: KPN
  scan_interval: 3600
  command: bash -c "/config/get-sstatus kpn"

- platform: command_line
  name: PIN
  scan_interval: 3600
  command: bash -c "/config/get-sstatus pin"

- platform: command_line
  name: Youtube
  scan_interval: 3600
  command: bash -c "/config/get-sstatus youtube"

- platform: command_line
  name: ABN
  scan_interval: 3600   
  command: bash -c "/config/get-sstatus abn-amro"

- platform: command_line
  name: Whatsapp
  scan_interval: 3600
  command: bash -c "/config/get-sstatus whatsapp"
  1. Display Shitty Status. Example with pretty pretty colors.
  - show_name: false
    show_icon: true
    type: button
    entity: sensor.youtube
    hold_action:
      action: none
    icon: mdi:youtube
    show_state: false
    icon_height: 28px
    card_mod:
      style: |
        :host {
          --card-mod-icon-color: {% if is_state('sensor.youtube', 'Operational') %}
                                   white
                                 {% endif %}
                                 {% if is_state('sensor.youtube', 'Warning') %}
                                   orange
                                 {% endif %}
                                 {% if is_state('sensor.youtube', 'Failed') %}
                                   red
                                 {% endif %};
              }

Hass you later!

1 Like

Sensors are in latest HA different:

- sensor:
    name: "Alle storingen - ODIDO"
    unique_id: c7328e83-8cd9-4d83-a4c9-b11aff82e2a1"
    scan_interval: 3600
    command: "/bin/bash /config/other/downdetector.sh odido"

- sensor:
    name: "Alle storingen - Apple iCloud"
    unique_id: "c2f6d522-70a8-4376-8bc8-eb7eecede4e6"
    scan_interval: 3600
    command: "/bin/bash /config/other/downdetector.sh iCloud"

They changed the way how to configure them