The code is as follows. I have used Sweet Home 3D software to draw the house type diagram and exported it in OBJ format. The room door is closed by default, and the 3D house type diagram can be displayed correctly on the front end of HA. I have added the entity of the door magnetic sensor to display the opening and closing of the door, but an error is reported. I don’t know where the problem is, please request help!
type: custom:floor3d-card
path: /local/floor3d-card
name: Home
objfile: 985.obj
mtlfile: 985.mtl
entities:
- entity: binary_sensor.sxpad_is_charging
- entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
type3d: door
door:
doortype: swing
side: right
direction: inner
degrees: '60'
hinge: null
object_id: sweethome3d_opening_on_hinge_1_door_382
action: more-info
zoom_areas:
- zoom: ''
lock_camera: 'no'
selectionMode: 'no'
editModeNotifications: 'yes'
header: 'yes'
click: 'no'
overlay: 'no'
hideLevelsMenu: 'no'
shadow: 'no'
extralightmode: 'no'
show_axes: 'no'
sky: 'no'
globalLightPower: '0.8'
backgroundColor: transparent
TypeError: Cannot read properties of undefined (reading ‘objects’)
at floor3d-card.js:2356:6622
at Array.forEach ()
at bf._add3dObjects (floor3d-card.js:2356:4982)
at bf._onLoaded3DModel (floor3d-card.js:2288:35635)
at Object.onLoad (floor3d-card.js:2231:531770)
at XMLHttpRequest. (floor3d-card.js:2231:435962)
floor3d-card.js:2356 Error: Object issue for Entity: <binary_sensor.lumi_lumi_sensor_magnet_aq2_opening> TypeError: Cannot read properties of undefined (reading ‘objects’)
at floor3d-card.js:2356:11044
at Array.forEach ()
at bf._add3dObjects (floor3d-card.js:2356:4982)
at bf._onLoaded3DModel (floor3d-card.js:2288:35635)
at Object.onLoad (floor3d-card.js:2231:531770)
at XMLHttpRequest. (floor3d-card.js:2231:435962)