Linux Magazine #2 2022: OpenHASP Listings
- April 26, 2022
- 0
Firmware flash:
esptool.py --port /dev/ttyUSB0 --baud 921600 write_flash 0x0 m5stack-core2_full_16MB_v0.6.2.bin
Statusbalk met tekstlabel:
{"page":1,"id":1,"obj":"label","x":0,"y":0,"w":320,"h":30,"text":"Badkamer","bg_color":"#2C3E50","text_color":"#FFFFFF","radius":0,"border_side":0} {"page":1,"id":2,"obj":"btn","x":110,"y":90,"w":100,"h":90,"toggle":true,"text":"\uE335","text_font":32,"mode":"break","align":"center"} {"page":1,"id":3,"obj":"label","x":260,"y":0,"h":30,"w":60,"text":"0.0 °C","align":"right","bg_color":"#2C3E50","text_color":"#FFFFFF"}
plate1.yaml:
plate1: objects: - obj: "p1b2" properties: "val": '{{ 1 if states("light.badkamerlamp") == "on" else 0 }}' "text": '{{ "\uE6E8" if is_state("light.badkamerlamp", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.badkamerlamp" - obj: "p1b3" properties: "text": '{{ states("sensor.badkamer_multisensor_temperature_air") }} °C'