Post #1628: , the code is ok but …
This code works for me in Property tab:
bpy.context.space_data.overlay.show_floor