Change the binary sensor api