@@ -84,6 +84,7 @@ class Place::Bookings < PlaceOS::Driver
8484 @sensor_stale_minutes : Time ::Span = 8 .minutes
8585 @perform_sensor_search : Bool = true
8686 @sensor_mac : String ? = nil
87+ @room_capacity : Int32 = 0
8788
8889 def on_update
8990 schedule.clear
@@ -154,7 +155,7 @@ class Place::Bookings < PlaceOS::Driver
154155 # Write to redis last on the off chance there is a connection issue
155156 control_sys = config.control_system.not_nil!
156157 self [:room_name ] = setting?(String , :room_name ).presence || control_sys.display_name.presence || control_sys.name
157- self [:room_capacity ] = setting?(Int32 , :room_capacity ) || control_sys.capacity
158+ self [:room_capacity ] = @room_capacity = setting?(Int32 , :room_capacity ) || control_sys.capacity || 0
158159 self [:default_title ] = @default_title
159160 self [:disable_book_now_host ] = @disable_book_now_host
160161 self [:disable_book_now ] = @disable_book_now
@@ -446,6 +447,7 @@ class Place::Bookings < PlaceOS::Driver
446447 ending_at: ending_at_calc,
447448 event_title: booking[" title" ]?,
448449 event_host: host_details,
450+ room_capacity: @room_capacity ,
449451 }
450452
451453 @expose_for_analytics .each do |binding , path |
0 commit comments