Fake Door lock sensor

Hi, I have this windows door than I alway forgot to lock. so I put a door sensor on the lock it work great but it’s a binary sensor. I would like to create a fake door lock entity ( lock / unlock ) and add it to my google home integration so when I ask my good home if the door is lock he will be able to answer me

Thanks

I found the solution via the home assistant lock template. but I deeded to put a lock/unlock command so here what I did :

lock:
  - platform: template
    name: Porte Passio
    value_template: "{{ is_state('binary_sensor.doorsensor1', 'on') }}"
    lock:
      service: group.reload
    unlock:
      service: group.reload