Skip to content

Instantly share code, notes, and snippets.

<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x'/>
<product id='0x'/>
</source>
</hostdev>
esphome:
name: smart-cafe
friendly_name: Smart Cafe
on_boot:
priority: -100
then:
- lambda: |-
if (id(cold_lever).state) {
id(lever_state).publish_state("Cold");
} else if (id(hot_lever).state) {
@adrianslabu
adrianslabu / 1. fan.yaml
Last active April 10, 2026 19:52
03. Youtube - Turn a regular FAN into a SMART fan
esphome:
name: fan-gym
friendly_name: Fan Gym
on_boot:
- if:
condition:
switch.is_off: child_lock
then:
- lambda: |-
if (id(switch_rotation).state) { id(rotation).turn_on(); }
@adrianslabu
adrianslabu / dehumidifier.yaml
Created September 16, 2025 20:41
02. Youtube - Turn ANY Device into a Smart Device with ESP8266
esphome:
name: dehumidifier
friendly_name: Dehumidifier
on_boot:
priority: -100
then:
- lambda: |-
if (id(state).state) {
id(button_power).press();
}
@adrianslabu
adrianslabu / 01. Youtube - How to Integrate Valetudo with Home Assistant
Last active August 25, 2025 17:36
Youtube - How to Integrate Valetudo with Home Assistant
# READ THIS FIRST #
File names match the video timestamps, so you can easily find the code for a specific moment in the video.