@Zacca I haven’t looked into the detail as I am currently working on something else, but Perhaps check out:
class ConfirmDeviceConfigExtention extends DeviceConfigExtension
configSchema:
xConfirm:
description: "Triggering a device action needs a confirmation"
type: "boolean"
required: no
apply: (config, device) -> #should be handled by the frontend
In lib/devices.coffee line 1183 and
onSwitchChange: ->
if @_restoringState then return
stateToSet = (@switchState() is 'on')
value = @getAttribute('state').value()
if stateToSet is value
return
@sliderEle.flipswitch('disable')
deviceAction = (if @switchState() is 'on' then 'turnOn' else 'turnOff')
doIt = (
if @device.config.xConfirm then confirm __("""
Do you really want to turn %s #{@switchState()}?
""", @device.name())
else yes
)
in pimatic-mobile-frontend/app/pages/index-items.coffee line 110
to get you underway.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins