is there a list of parts to build it? i cant seem to find one. do you know where it is? thanks!
@luma I can not see the Time or Date on the display? Is my string wrong? Where is the time getting pulled from?
- alias: HASwitchPlate_Clock
trigger:
platform: time
# Matches every minute
seconds: 00
condition:
- condition: state
entity_id: 'binary_sensor.haswitchplate'
state: 'on'
action:
- service: mqtt.publish
data:
topic: 'homeassistant/haswitchplate/HASwitchPlate/command/p[2].b[4].txt'
payload_template: "\"{{now().strftime('%H:%M')}}\""
retain: true
- service: mqtt.publish
data:
topic: 'homeassistant/haswitchplate/HASwitchPlate/command/p[2].b[5].txt'
payload_template: "\"{{now().strftime('%A')}}\\r{{now().strftime('%B %-d')}}\""
retain: true
- alias: HASwitchPlate_Clock_Init
trigger:
- platform: mqtt
topic: 'homeassistant/binary_sensor/HASwitchPlate/state'
payload: 'ON'
- platform: homeassistant
event: start
action:
- service: mqtt.publish
data:
topic: 'homeassistant/haswitchplate/HASwitchPlate/command/p[2].b[4].font'
payload: '3'
- service: mqtt.publish
data:
topic: 'homeassistant/haswitchplate/HASwitchPlate/command/p[2].b[5].font'
payload: '1'
This is the example code Iām trying from the examples. Please help I love this project.
Dear all,
really nice work!
Nobody has added a temperature sensor and a relay?? My idea is to transform in a Generic Thermostat with MQTT Temperature sensor and put all in a 503 wall socketā¦
Thanks,
Ivan
The date/time comes from now()
and is formatted by strftime
.
This is what the second example above looks like in the Home Assistant template editor:
If itās not showing up on the display, can you monitor the MQTT traffic w/ mosquitto_sub
(or similar) and post what the output looks like here?
The trouble with a temperature sensor will be finding enough space on the front panel to position such a sensor so that it faces into the room. A relay is on my āmaybeā list, but that involves a substantial amount of engineering to implement in a safe manner.
Ok @luma I had 2 problems with the clock the date call was not working like this
"\"{{now().strftime('%A')}}\\r{{now().strftime('%B %-d')}}\""
the date %-d
was not working for me I used %d
Now it works. also I have no entity_id: 'binary_sensor.haswitchplate'
So commented it out then looked at the docs but didnāt see were you added a binary_sensor. Also Iām in US so I changed the Clock to 12hr with
payload_template: "\"{{now().strftime('%I:%M')}}\""
Thanks! yet again
Iām curious about this - what platform are you running on? -d
is mentioned in the strftime documentation as being āplatform specificā. Iāve run hass w/ the automation on raspbian and ubuntu (x64) and it works as expected.
That requires MQTT discovery to be enabled. Itās used in a lot of places in my example automations, and Iād strongly recommend adding that to your config. ābinary_sensor.haswitchplateā will be created automatically via this mechanism and is used to report to hass if the HASP device is online or not. Several of the automations will trigger based on this sensor going online to initialize the panel, so a bunch of things arenāt going to work right if you donāt have MQTT discovery enabled.
Maybe it does! I have no idea what a 503 is, and Google isnāt helping, but the enclosure design is included in the github repo and is editable with the free version of SketchUp if you want to modify it to fit your own use case.
Iām running it on a VM Ubuntu x64 but Iām using HassIO maybe thats why.
I guess I need to get MQTT discovery working correctly. I thought it was working with a prefix of homeassistant
maybe the code required /homeassistant
got to check.
homeassistant
(no leading slash) should be the correct setting.
Yes, I think itās working. What other sensors does it make? It looks like it is working with other auto discover devices (Espurna).
Thanks for this amazing Project
Next Year i have to renovate our Kitchen an Living room, then i will integrate a few switches
Yup! The Arduino sketch is mostly just passing through Nextion commands, so you can send any normal Nextion command using MQTT per the docs here.
So something like ā[ā¦]/command/p[1].b[4].visā ā0ā or am I way off base?
Nvm. Figured it out. Iām a little slow apparently. I didnāt realize that sending the page, etc wasnāt needed.
Just ā[ā¦]/commandā āvis 4,0ā
Installed into the wall in a low voltage bracket (Iām using a 5V micro-USB power supply and feed the power under the outlet cover and up the inside of the wall to it). Glad I finally did this and it works great. I had the display, ESP8266, and cover but never put it anywhere. Itās in a nice central location of my house.
I know I brought this up before and I donāt remember what the cause is, but can you @luma explain to me again why the page does a double or triple refresh when it changes pages? Thanks!
The writeup below is still pertinent although input_slider
is now input_number
. The updated page flipping automation should address the issue.
Hmmm, I have the latest pages automation yet it still refreshes the multiple times on page change. Iāve reloaded automations and restarted HA many times. In fact Iāve had that exact automation file since at least november 6th.