Hey all, I am struggling with making my own custom capability as my slider only show percentage and not the unit that i want. I am also not able to display either the title, hint or desc in the app.
this is the from app.json:
"capabilities": {
"charger_status": {
"id": "charger_status",
"type": "boolean",
"title": {
"en": "Vehicle charging",
"no": "Kjøretøy lader"
},
"desc": {
"en": "Check if vehicle is charging or not",
"no": "Sjekk om kjøretøy lader eller ikke"
},
"getable": true,
"setable": false,
"icon": "/assets/svg/chargeFrom.svg",
"uiComponent": "sensor",
"uiQuickAction": true
},
"set_current_limit": {
"id": "set_current_limit",
"type": "number",
"title": {
"en": "Change the currentlimit",
"no": "Endre på strømgrense"
},
"desc": {
"en": "Set the charger current. The max value is adjusted to the max charger current of the wallmount.",
"no": "Sett strømtrekket på laderen. Maksverdien justeres etter maksgrensen på strømtrekket på veggfestet."
},
"chartType": "stepLine",
"min": 6,
"max": 32,
"decimals": 2,
"step": 1,
"units": {
"en": "A",
"no": "A"
},
"getable": true,
"setable": true,
"uiComponent": "slider"
},
"toggle_charging": {
"id": "toggle_charging",
"type": "boolean",
"title": {
"en": "Toggle charging",
"no": "Veksle lading"
},
"desc": {
"en": "Activate or deactivate charging",
"no": "Start eller stopp lading"
},
"getable": true,
"setable": true,
"icon": "/assets/svg/chargerOn.svg",
"uiComponent": "toggle",
"uiQuickAction": true
}
}
}
I have set the max and min charge value to be dynamically changed by the charger itself, and this works fine, the only problem is that the user will see the value as percentage with 10A being 1000% ect. The user will either be able to see what they are changing as no description of helping text shows up like “You can change the charging current here” or even a little pop-up that says “you changed the charging current to ‘value’.”