Hi all
I have Apex Charts set up monitoring my CPU temp and triggering a USB switch when the temp is too high. System is a fanless one but I don’t like it when it gets too hot, so just stuck a USB switch with a little USB fan.
Anyway, I’m using the transform function which worked before and according to all the posts I’ve read, should work. But it doesn’t. The entity does show off and on times but nothing is shown in the chart.
What am I doing wrong?
type: custom:mini-graph-card
name: Temperature - 24hr
icon: mdi:server
hours_to_show: 24
points_per_hour: 30
animate: true
line_width: 2
apex_config:
yaxis:
min: 30
max: 80
entities:
- entity: sensor.system_monitor_processor_temperature
name: CPU Temperature
- entity: switch.switch_usb_ha_cooling_fan_l2
name: Fan
transform: "return x === 'on' ? 80 : 0;"