chart_buttons=False, label=False, #chart_fill=False, chart_point=0) from kervi.devices.sensors.dummy_sensor import DummySensorDeviceDriver, DummyMultiDimSensorDeviceDriver BATTERY_SENSOR = Sensor("Battery", "Battery", DummySensorDeviceDriver()) BATTERY_SENSOR.set_ui_parameter( "value_icon", [{ "range": [0, 5], "icon": "mdi:battery-alert-variant-outline" }, { "range": [5, 25], "icon": "mdi:battery-10" }, { "range": [20, 50], "icon": "mdi:battery-50" }, { "range": [5, 75], "icon": "mdi:battery-70" }, { "range": [75, 100], "icon": "mdi:battery" }]) BATTERY_SENSOR.link_to_dashboard("dashboard", "number_gauge", link_to_header=True, display_unit=False, show_sparkline=False, show_value=False)
"sensors", type="value", show_sparkline=True) MySensor() BATTERY_SENSOR = Sensor("Battery", "Battery", DummySensorDeviceDriver()) BATTERY_SENSOR.set_ui_parameter("value_icon", [{ "range": [0, 5], "icon": "battery-empty" }, { "range": [5, 25], "icon": "battery-quarter" }, { "range": [20, 50], "icon": "battery-half" }, { "range": [5, 75], "icon": "battery-three-quarters" }, { "range": [75, 100], "icon": "battery-full" }]) BATTERY_SENSOR.link_to_dashboard(link_to_header=True, display_unit=False, show_sparkline=False, show_value=False) MULTI_SENSOR = Sensor("MultiSensor", "Multi dimension", DummyMultiDimSensorDeviceDriver()) MULTI_SENSOR.link_to_dashboard(panel_id="sensors", type="value")