Skip to content

Instantly share code, notes, and snippets.

View zubir2k's full-sized avatar
🏠
Working from Home

Zubir Jamal zubir2k

🏠
Working from Home
View GitHub Profile
@zubir2k
zubir2k / HomeAssistantAdzan
Last active September 8, 2021 07:21
JAKIM eSolat Year (experimental)
## JAKIM eSolat (experimental) ##
# Based on json response stored into a file.
# Place the json file into config/www/
# Add 1 additional automation to download new data (JSON) from eSolat API every 1st Jan
## configuration.yaml ##
sensor:
- platform: rest
name: eSolat API
resource: https://xxx.duckdns.org/local/esolat.json
@zubir2k
zubir2k / HomeAssistantTakbirRaya
Last active August 18, 2021 10:01
HomeAssistantTakbirRaya
# Integration Required:
# 1. Google Calendar (https://www.home-assistant.io/integrations/calendar.google)
# 2. Malaysia Holiday Calendar
# Create new automation and paste below.
alias: Takbir
description: ''
trigger:
- platform: template
value_template: >-
@zubir2k
zubir2k / HomeAssistantDSSVOIP
Last active September 3, 2021 03:52
VoIP call on Home Assistant with DSS VoIP Addon
### DSS VoIP Addon Configuration with IPTel.org
### Consist of 2 areas:
### 1. configuration.yaml
### 2. lovelace
###
### Requirements:
### 1. SIP account with IPTel.org (free)
### 2. DSS VoIP addon (https://github.com/sdesalve/hassio-addons/tree/master/dss_voip)
### 3. A working TTS
@zubir2k
zubir2k / HomeAssistantWashingMachine
Created September 6, 2021 19:39
Washing Completion Notification based on value from Power Monitoring Plug.
## Washing Machine Notification
###############################
## Description:
## 1. Based on power monitoring plug (measuring in Watt & Amp)
## 2. State is determined by power monitoring value (further analysis is required; recommended 3 cycle washing)
## 3. Adjust the Watt & Amp value in the template sensor according to your analysis result
## 4. Notification is triggered based on final value (when washing is completed state)
## 5. Weather forecast is using OpenWeatherMap integration. Can also use others.
## configuration.yaml ##
@zubir2k
zubir2k / HomeAssistantYoutube
Last active September 9, 2021 02:22
Home Assistant Sensors for Youtube Subscriber & Viewers from Socialblade
## Youtube Subscription & Viewers Sensors
#########################################
## Stats is based on Socialblade using scrape. Scan interval is set at 30min to avoid from being blocked.
## Consist of 2; subscriber and views sensors
## Automation ideas: use telegram to notify changes. Can also trigger other stuff like RGB light bulb (e.g. Flashing red).
## configuration.yaml ##
sensor:
- platform: scrape
name: Youtube Subscriber
@zubir2k
zubir2k / HomeAssistantTNB
Last active September 20, 2021 23:22
Calculate TNB Bill based on Energy Sensor
########################
## configuration.yaml ##
########################
## Change sensor name accordingly (sensor.sonoff_xxxxxxxxx)
## Original code from bro Ishak (https://github.com/ishakmuhamad/bill_tnb_ha)
## AlexxIT/SonoffLAN ##
sonoff:
username: your@email.here
password: password
@zubir2k
zubir2k / HomeAssistantSolatGPS
Last active April 26, 2022 06:01
HomeAssistantSolatGPS
## Solat by Location ##
# Based on API Provided by Malaysia Prayer Time (https://mpt.i906.my/api.html)
# Please change the person sensor (person.zubir) accordingly..
# Place this code into configuration.yaml
sensor:
- platform: rest
name: "Solat GPS"
scan_interval: 1800
resource_template: "https://mpt.i906.my/api/prayer/{{ state_attr('person.zubir', 'latitude') ~ ',' ~ state_attr('person.zubir', 'longitude') }}"

Home Assistant Doa Pagi & Takbir visitors

Automation playing Doa Pagi on sunrise with addition of Takbir Raya on Eidul Fitr and Eidul Adha

Prerequisite

  • This will create hijri date sensor
  • It will allow to trigger based on the following conditions:
    1. Eidul Fitri 1 Syawal (01-10)
    2. Eidul Adha 10 Zulhijjah (10-12)
@zubir2k
zubir2k / HomeAssistantIslamicPrayerTimeExtended.md
Last active April 24, 2024 14:31
Home Assistant Islamic Prayer Time [Extended]

Home Assistant Islamic Prayer Time [Extended]

Reference: https://www.home-assistant.io/integrations/islamic_prayer_times

Assalamu'alaikum

The current integration only creates sensors consist of fajr, dhuhr, asr, maghrib, isha, sunrise and midnight. This will add 2 additional sensors which will ease in creating adzan automation:

  1. Current Prayer Time
  2. Imsak Time
@zubir2k
zubir2k / MinecraftAlert.md
Created July 17, 2023 07:30
Minecraft Server Alert