lovelace-rpi-monitor-card
lovelace-rpi-monitor-card copied to clipboard
displaying free / used memory on the Custom RPi Card
Total memory and %age used is available in the monitoring script output. Is there a way to customize the RPi custom card to pick and choose what sensor values to display vs. the defaults
Hmmm... not at this time. You likely already know that you can see the values by tapping on the card, right?
So, what would you propose? Sensors would have to be swapped out. So which would you replace with what?
I think showing memory usage % is better than for example Model Interfaces. But it would be nice if the sensors displayed were configurable.
maybe have RAM utilization vs. the SD Card size? the disk space usage already appears, which is probably more relevant than the total disk space (although I understand, this may depend on my own usecase).
what i had in mind was something like the default 'glance' card, or @dangreco's threedy_card that allows you to pick which sensors you want displayed for the entity.
type: 'custom:threedy-card'
base_entity: sensor.ender_5
monitored:
- Status
- ETA
- Hotend
- Bed
- Elapsed
- Remaining
I may attempt this modification as I start learning a bit of programming and HA customization
I like this as well. It would be nice to have the option to add memory and CPU usage. For me, this is more relevant than total disk space or OS.
I created a template for memory percentage. If you put the following into the Template editor, you'll see the result of each step. I then just created a sensor based on the third one and added that to a vertical stack card using CPU usage, the new sensor, and then the RPi Monitor Card below those.
free: {{ state_attr('sensor.rpi_monitor_omv', 'memory').free_mb }}
memory: {{ state_attr('sensor.rpi_monitor_omv', 'memory').size_mb }}
percent: {{ ((state_attr('sensor.rpi_monitor_omv', 'memory').free_mb |int / state_attr('sensor.rpi_monitor_omv', 'memory').size_mb |int ) * 100) | round(0)}}%
The last percent sign is just the 'unit' and is not necessary for the template.
@jsp196 Thanks for the template! I created this template for used memory:
memory used in percentage:
{{ (100 / (state_attr('sensor.rpi_monitor_omv', 'memory').size_mb |int) * ((state_attr('sensor.rpi_monitor_omv', 'memory').size_mb |int ) - (state_attr('sensor.rpi_monitor_omv', 'memory').free_mb |int ))) | round(0) }}%
I've submitted a pull request for this change
modified card and script output below
This is merged into repo... working on more changes, then will release!
Changes committed. Feature appears in v1.2.6 and later