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 / Cloudflare.md
Created November 5, 2023 09:26
Cloudflare

Cloudflare DNS Bash Script

Simple bash script that will update your A record to your current IP.
This script can be used in Synology Task Scheduler.

image

Preparing Setup

  1. To get your Cloudflare Zone ID and API key, log in to the Cloudflare Dashboard for the domain you want to use. Your Zone ID will be displayed in the bottom right corner.
@zubir2k
zubir2k / batterymonitoring.md
Last active February 2, 2024 03:46
Battery Monitoring - Mobile/Tablets based on HA Companion App

Battery Monitoring

What is this? A simple jinja template that will show battery level for mobile devices only.

There are 2 options:

  1. Alert first, then list of device
  2. List of device first, then alert

image

@zubir2k
zubir2k / solplanet.md
Last active October 13, 2024 08:54
Solplanet Inverter Template - IP and Serial No. maintained in a text input.

🌞 Solplanet Inverter Template

Easily apply template with Text input for inverter IP and serial no.
Note:

  1. If you have battery, it will fetch battery information such as SoC, Voltage, Amps, Current.
  2. I use ShellyEM to read reverse energy via CT Clamp.

🛠️ Initial Setup

Enter inverter IP Address and Serial Number to these input_text entity:
image

⚡TNB NEM Calculator

This template will create the necessary sensor that calculates your monthly TNB bill with NEM (Net Energy Metering).

📦 Installation

  1. Set path /HAMY as package directory in your configuration.yaml (if you have not done so)
homeassistant:
  packages: !include_dir_named HAMY/
@zubir2k
zubir2k / Panda PWR.md
Last active March 19, 2025 15:55
Panda PWR Template

Panda PWR Home Assistant Template

image

First of all, this is an alternative to the Panda PWR custom integration made by @juanillo62gm

I noticed that the connectivity while using that integration keeps on disconnected with timeout error shown in the log.
So I decided to take a look into the Bigtreetech API documentation for Panda PWR and create a working template.

However, I do hope that Bigtreetech would consider adding MQTT support within the WebUI itself as describe here PandaPWR/Issue #20

@zubir2k
zubir2k / gasconsumption.md
Last active August 30, 2025 21:47
Gas Consumption Based on Cooker Hood

🔥 Gas Consumption based on Cooker Hood

Requirement

  • Power monitoring switch (Wifi/Zigbee) installed to Cooker Hood
  • Assumption: Current above 40watt is considered running (adjust accordingly)

What to adjust

  • sensor.cooker_hood_power
  • float > 40 (change this to the current value that matched with cooker hood in running state)