Skip to content

Instantly share code, notes, and snippets.

View Gr8z's full-sized avatar

Mohammad Dohadwala Gr8z

View GitHub Profile
blueprint:
name: Aqara H2 Wireless Switch (2 gang) — 2 Lights (Z2M MQTT)
description: >
Two lights via Aqara H2 wireless 2-gang switch over Zigbee2MQTT (raw MQTT trigger).
Left rocker → Light 1, Right rocker → Light 2.
• Single click → toggle on/off
blueprint:
name: Aqara H2 Wireless Switch (2 gang) — 2 Lights (Z2M MQTT)
description: >
Two lights via Aqara H2 wireless 2-gang switch over Zigbee2MQTT (raw MQTT trigger).
Left rocker → Light 1, Right rocker → Light 2.
• Single click → toggle on/off
blueprint:
name: Aqara H2 Wireless Switch (2 gang) — 2 Lights (Z2M MQTT)
description: >
Two lights via Aqara H2 wireless 2-gang switch over Zigbee2MQTT (raw MQTT trigger).
Left rocker → Light 1, Right rocker → Light 2.
• Single click → toggle on/off
blueprint:
name: Aqara H2 Wireless Switch (2 gang) — 2 Lights + Dimming (Z2M MQTT)
description: >
Control two lights with an Aqara H2 wireless remote switch (2 gang) via
Zigbee2MQTT, using a raw MQTT trigger (reads `action` from the topic
payload).
Left rocker → Light 1, Right rocker → Light 2.
blueprint:
name: Aqara H2 Wireless Switch (2 gang) — 2 Lights with Dimming (Z2M)
description: >
Control two lights with an Aqara H2 wireless remote switch (2 gang) via
Zigbee2MQTT.
Left rocker → Light 1, Right rocker → Light 2.
• Single click → toggle the light
@Gr8z
Gr8z / vehicle.json
Last active June 7, 2023 09:15
CAFU Hackathon - Night City - Mock API
{
"id": 892,
"name": "Volvo V60",
"vehicle_model_id": 19,
"vehicle_model": {
"id": 19,
"make_id": 8,
"name": "Model S",
"body_type": "sedan",
"production_years": null,
@Gr8z
Gr8z / AddProduct.aspx.cs
Created January 18, 2020 20:05
Web Tech snippets
fuImage.SaveAs(Request.PhysicalApplicationPath +"./images/"+ fuImage.FileName.ToString());
b = "./images/" + fuImage.FileName.ToString();
SqlCommand cmd = new SqlCommand("INSERT INTO Fruits (FruitName, FruitPrice, FruitImage) VALUES (@FruitName, @FruitPrice, @FruitImagePath)", con);
cmd.Parameters.AddWithValue("@FruitName", txtFruitName.Text);
cmd.Parameters.AddWithValue("@FruitPrice", txtFruitPrice.Text);
cmd.Parameters.AddWithValue("@FruitImagePath", b.ToString());
cmd.ExecuteNonQuery();
gvFruits.DataBind();