fidex lamp info

This commit is contained in:
2026-09-15 12:30:33 +02:00
parent ad4d9b4c7a
commit 8f146678de
3 changed files with 19 additions and 5 deletions
+2
View File
@@ -17,6 +17,8 @@ class HAsensor(HAentity):
device_class: Optional[str] = None
state_class: Optional[str] = None
icon: Optional[str] = None
payload_on: Optional[bool] = None
payload_off: Optional[bool] = None
request: Type = Field(exclude=True)
class HAbutton(HAentity):
+14 -3
View File
@@ -251,7 +251,7 @@ def main() -> int:
name=f"Power",
unique_id=f"{lamp_device.short_name}_power",
state_topic=f"{sony_device.short_name}/{lamp_device.short_name}/state",
value_template="{{ value_json.LampPower }}",
value_template="{{ value_json.LampWattage }}",
device_class="power",
state_class="measurement",
unit_of_measurement="W",
@@ -265,18 +265,29 @@ def main() -> int:
unique_id=f"{lamp_device.short_name}_status",
state_topic=f"{sony_device.short_name}/{lamp_device.short_name}/state",
value_template="{{ value_json.LampStatus }}",
state_class="measurement",
icon="mdi:ab-testing",
request=PrjLampInformation,
device=lamp_device
))
lamp_device.entities.append(HAsensor (
name=f"Serial Number",
unique_id=f"{lamp_device.short_name}_serial",
state_topic=f"{sony_device.short_name}/{lamp_device.short_name}/state",
value_template="{{ value_json.LampSerialNumber }}",
icon="mdi:barcode-scan",
request=PrjLampInformation,
device=lamp_device
))
lamp_device.entities.append(HAsensor (
name=f"Lamp ON",
unique_id=f"{lamp_device.short_name}_lampon",
state_topic=f"{sony_device.short_name}/{lamp_device.short_name}/state",
value_template="{{ value_json.LampOn }}",
device_class="power",
device_class="light",
payload_on=True,
payload_off=False,
icon="mdi:lightbulb-on-outline",
entity_type="binary_sensor",
request=PrjLampInformation,
+3 -2
View File
@@ -14,18 +14,19 @@
}
-->
<?xml version="1.0" encoding="UTF-8"?>
<SMSMessage xmlns="http://xmlns.sony.net/d-cinema/sms/2007b">
<MessageHeader>
<Id>-1</Id>
<Type>PrjLampInformation</Type>
<Timestamp>1788008745066</Timestamp>
<Timestamp>1789467013928</Timestamp>
<Source>LSM-100v2</Source>
</MessageHeader>
<MessageBody>
<PrjLampInformation>
<ProjectorId>0</ProjectorId>
<LampId>2</LampId>
<HoursOfUse>1763</HoursOfUse>
<HoursOfUse>1764</HoursOfUse>
<LampSerialNumber>CVK1616</LampSerialNumber>
<LampMaximumWattage>330</LampMaximumWattage>
<LampWattage>80</LampWattage>