Skip to content

Instantly share code, notes, and snippets.

@bessarabov
Created December 31, 2020 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bessarabov/6d8ab5a71258cc43cc64ddd317e9ba3e to your computer and use it in GitHub Desktop.
Save bessarabov/6d8ab5a71258cc43cc64ddd317e9ba3e to your computer and use it in GitHub Desktop.
Clock that shows current year. ESPHome + Home Assistant
esphome:
name: clock
platform: ESP8266
board: nodemcuv2
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
api:
password: !secret api_password
ota:
password: !secret ota_password
time:
- platform: homeassistant
id: homeassistant_time
display:
platform: tm1637
clk_pin: D2
dio_pin: D1
update_interval: 200ms
lambda: |-
it.strftime("%Y", id(homeassistant_time).now());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment