Skip to content

Instantly share code, notes, and snippets.

View peyanski's full-sized avatar

Kiril Peyanski peyanski

View GitHub Profile
@peyanski
peyanski / Gyro_BMI160_for_HA.yaml
Created February 14, 2024 07:22
Gyroscope + Accelerometer (Inertial) Sensor that Works with Home Assistant
esphome:
name: gyro-bmi160
friendly_name: Gyro_BMI160
esp8266:
board: esp01_1m
# Enable logging
logger:
@peyanski
peyanski / Gyro_BMI160_Demo_Automaition.yaml
Created February 14, 2024 07:25
Demo Automation that uses BMI160 to control a Smart Bulb. Please change device_id & entity_id with yours!
alias: rotate Gyro to control a Smart Bulb
description: ""
trigger:
- type: value
platform: device
device_id: 1aebc4c337ba29a2c0056367ed4f14d9
entity_id: afb31e3560db5372fb7df63e258994d5
domain: sensor
below: -6
id: rotate-right-x
@peyanski
peyanski / mealie_calendar_persistent.yaml
Created July 24, 2024 08:02
home assistant script for mealie calendar sent as persistent notification
alias: Mealie Calendar
sequence:
- service: calendar.get_events
target:
entity_id:
- calendar.mealie_breakfast
- calendar.mealie_lunch
- calendar.mealie_dinner
- calendar.mealie_side
data:
@peyanski
peyanski / Telegram Configuration for HA
Last active February 4, 2025 06:46
Add these lines in your configuration.yaml file and change the Access Token & chat ID with yours to make it work.
# STEPS TO GET THE TELEGRAM TOKEN AND CHAT ID ARE:
## 1. In Telegram, open a chat with @BotFather - https://t.me/BotFather and enter /newbot.
## 2. Follow the instructions and store the token somewhere safe.
## 3. To get a chat ID, send any message to the GetIDs bot - https://t.me/getidsbot
## 4. Enter /start. The bot will return your chat ID
## 5. Find your newly created bot and start a chat with it
## 6. Add the YAML code below in configuration.yaml file in Home Assistant and restart HA
# configuration.yaml entry
@peyanski
peyanski / bme680-esphome-code.yaml
Created February 5, 2025 08:54
DIY Smart Sensors Live Workshop - BME680 ESPhome code
i2c:
sda: 4
scl: 5
scan: True
web_server:
port: 80
# version: 3
ota: false