stevemann
(Stephen Mann (YAML-challenged))
March 11, 2024, 10:48pm
21
Fair ask…
external_components:
- source:
type: git
url: https://github.com/ssieb/esphome_components
components: [ ht16k33_alpha ]
substitutions:
device_name: adafruit-test
friendly_name: adafruit_test
packages:
wifi: !include common/wifi.yaml
device_base: !include common/esp8266.yaml
# -------------------------- Overrides --------------------------
esp8266:
board: d1_mini
i2c:
scl: D1 #GPIO3
sda: D2 #GPIO5
frequency: 50000
scan: true
time:
- platform: homeassistant
id: homeassistant_time
text_sensor:
- platform: template
name: "Current Time"
id: current_time
lambda: |-
char str[6]; // Space for "HH:MM\0"
time_t currTime = id(homeassistant_time).now().timestamp;
strftime(str, sizeof(str), "%H%M", localtime(&currTime));
return { str };
update_interval: 60s
display:
- platform: ht16k33_alpha
address: 0x71
scroll: false
lambda: |-
char formatted_time[12]; // Space for "HHMM\0"
snprintf(formatted_time, sizeof(formatted_time), "%s", id(current_time).state.c_str());
it.set_brightness(0.1);
it.print(formatted_time);
- platform: ht16k33_alpha
address: 0x70
scroll: false
lambda: |-
it.set_brightness(0.1);
it.print("TEST");
nickrout
(Nick Rout)
March 11, 2024, 10:55pm
22
Just as a contrast, I use a seed studio sensecap indicator (https://www.seeedstudio.com/SenseCAP-Indicator-D1Pro-p-5644.html with openhasp to do a bedside glucose/time display. Works just great.
Here is a screenie.
stevemann
(Stephen Mann (YAML-challenged))
March 12, 2024, 2:58am
23
Looks more versatile than mine:
Mine currently gets all its data via MQTT. How does the Sensecap get its data?
nickrout
(Nick Rout)
March 12, 2024, 8:21am
24
Via mqtt from HA.
bedside:
objects:
- obj: 'p1b4'
properties:
text: '{{ states("sensor.blood_sugar") }}mmol/L'
- obj: 'p1b2'
properties:
text: '{{ states("sensor.blood_sugar_trend")}}'
- obj: "p1b3"
properties:
"text": "{% from 'easy_time.jinja' import clock %}{{ clock() }}"
- obj: 'p1b5'
properties:
"text": '{{ states("sensor.blood_sugar_delta")}}'
stevemann
(Stephen Mann (YAML-challenged))
March 12, 2024, 1:50pm
25
Cool. My wife likes the look of the device. Can it be used for other features of Home Assistant?
1 Like
nickrout
(Nick Rout)
March 12, 2024, 7:20pm
26
stevemann
(Stephen Mann (YAML-challenged))
March 12, 2024, 7:27pm
27
Thanks, but I already have four HASP devices including one in a desktop stand. She wants something where she can also see the front-porch camera.
nickrout
(Nick Rout)
March 12, 2024, 7:36pm
28
No i don’t believe you can cast a video too it. A picture, yes.
stevemann
(Stephen Mann (YAML-challenged))
March 12, 2024, 8:29pm
29
Maybe if the picture is updated every ten or twenty seconds? Enough to determine who is at the door.
nickrout
(Nick Rout)
March 12, 2024, 8:43pm
30
That might work. Use the openhasp.push_image service. See Example Automations - openHASP
veli
March 17, 2024, 9:56pm
31
I wanted this format - “Mon 5. Feb” and got it with:
auto now = id(rtc_time).now();
// check valid time
if (now.is_valid()) {
char dateStr[20];
// Manually construct the date string cuz %-d is not supported
sprintf(dateStr, "%s %d. %s", now.strftime("%a").c_str(), now.day_of_month, now.strftime("%b").c_str());
it.printf(w/2 + hxadd, hy, id(text_small), get_time_color, TextAlign::CENTER, dateStr);
}