Add product picture to ozw node dashboard#7203
Conversation
|
What was the problem with flexbox? Seems like it should be easy? |
|
I couldn't figure out text wrapping, though in the current configuration text wrapping may not be necessary. I'll mess with it a little more and see what I can come up with. |
952651c to
f7b360b
Compare
|
Converted from float to flexbox 👍 |
src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts
Outdated
Show resolved
Hide resolved
| : ``} | ||
| </div> | ||
| <div class="product-image"> | ||
| ${this._metadata?.metadata.ProductPicBase64 |
There was a problem hiding this comment.
Can we btw do this differently? Sending large files like images over the WebSocket is not recommended, would rather have just the URL or something.
There was a problem hiding this comment.
OZW just has the base64 encoded image in the MQTT data for the node. Though I suppose we could register a regular HTTP endpoint on the backend to return the image instead of feeding it over the websocket. I've never done anything with custom endpoints like that in the backend though.
There was a problem hiding this comment.
Something for a future PR maybe
|
Ready for final review 👍 |
Proposed change
OpenZWave provides a base64 version of the product picture for many different models of Z-Wave devices in the node metadata. This PR includes that image on the Node Dashboard in the config panel.
Using
floatfeels dirty in 2020 but that seemed to end up with less code than trying to flexbox it.Planning to do a separate PR to add this to the device page for ozw devices as well.
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: