define DASH_COTTONELLE PRESENCE lan-ping 192.168.178.69 1
attr DASH_COTTONELLE ping_count 1
attr DASH_COTTONELLE event-on-change-reading state,presence
attr DASH_COTTONELLE userReadings lastpresent {if (Value("DASH_COTTONELLE") eq "present") {ReadingsTimestamp("DASH_COTTONELLE", "state", "false")} else {ReadingsVal("DASH_COTTONELLE","lastpresent","")}}
attr DASH_COTTONELLE alias Cottonelle
attr DASH_COTTONELLE group Dash Button
attr DASH_COTTONELLE room Dash
define DASH_COTTONELLE_ACTION notify DASH_COTTONELLE:present IF ( [S_SWITCH_PCA301_1] eq "on") ( set S_SWITCH_PCA301_1 off ) ELSE ( set S_SWITCH_PCA301_1 on )
attr DASH_COTTONELLE_ACTION room hidden