#Entity states not displaying as expected in markdown

1 messages · Page 1 of 1 (latest)

restive birch
#

Hello!

So this may be a common problem and I've not been able to find other instances of something similar, but I'm kinda running out of ideas. When I use a "normal" panel to display an entity's state, it renders as I expect it to. But when I use markdown to try to display that same state, it uses the raw value, as I understand it. The addon I'm using has translation mapping to ensure the state is displayed in a friendly state.

  - type: tile
    entity: sensor.wyndham_circle_sensors_precipitation_description
  - type: markdown
    content: "{{ states('sensor.wyndham_circle_sensors_precipitation_description') }}"

My localization settings are set and I've attempted rebooting and reloading things.

Am I just simply doing something wrong?

Thanks!

fallen garden
#

Try state_translated() instead of states()

restive birch
#

I appreciate that pointer!

fallen garden
#

it's relatively new-ish

#

It's documented in templating

restive birch
#

Ahh okay I've not ventered into templating yet. I was trying to start out with easier things.

fallen garden
#

Yes you have 😁
{{ states('sensor.wyndham_circle_sensors_precipitation_description') }}

restive birch
#

Well, I should say I have not knowingly :p

#

Thanks to you the weather dashboard is looking great!

restive jolt
fallen garden
#

I guess it's actually been there since last Feb

restive jolt
#

I'm not surprised. I missed it and then don't see it referenced until a time like now.

restive jolt
fallen garden
#

looks just like a Kindle

restive birch
# restive jolt Can you talk a bit about your display? Is it a bare screen (running a Pi Zero?) ...

It is a Kindle that's been jailbroken to run the online-screensavers app, which allows you to point it to a URL that serves images.

I'm using HA to build a dashboard for the Kindle screen size, then an addon that converts the dashboard into a grey scale PNG, and opens a port that you can point the Kindle at to retrieve the image to use as the screensaver.

https://github.com/sibbl/hass-lovelace-kindle-screensaver

GitHub

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed. - sibbl/hass-lovelace-kindle-screensaver

restive jolt
#

Nice. I have a Scribe that doesn't get much use. Use jail-broken Fire 10s for dashboards. Never considered looking to see what could be done with a Kindle.