### Complete cec2mqtt Configuration Example Source: https://github.com/robertme/cec2mqtt/blob/master/README.md A comprehensive example of the cec2mqtt configuration file, including MQTT credentials, state topic, and Home Assistant discovery settings. ```yaml mqtt: host: 1.2.3.4:1883 username: User password: P@ssw0rd state_topic: cec2mqtt/state birth_message: online will_message: offline base_topic: cec2mqtt home_assistant: enable: true discovery_prefix: homeassistant ``` -------------------------------- ### Enable Home Assistant Integration Source: https://github.com/robertme/cec2mqtt/blob/master/README.md Add this configuration to enable Home Assistant's auto-discovery feature for cec2mqtt entities. ```yaml home_assistant: enable: true ``` -------------------------------- ### MQTT State Topic Configuration Source: https://github.com/robertme/cec2mqtt/blob/master/README.md Configure the MQTT state topic, birth message, and will message. This is often required when using the Home Assistant integration. ```yaml mqtt: state_topic: cec2mqtt/state birth_message: online will_message: offline ``` -------------------------------- ### Docker Compose for cec2mqtt Source: https://github.com/robertme/cec2mqtt/blob/master/README.md A basic docker-compose.yaml file to set up and run cec2mqtt as a service. It includes volume mapping, device access, and restart policy. ```yaml version: '3' services: cec2mqtt: container_name: cec2mqtt image: ghcr.io/robertme/cec2mqtt:edge volumes: - ./data:/data/cec2mqtt devices: - /dev/cec0 restart: unless-stopped ``` -------------------------------- ### Run cec2mqtt with Docker Source: https://github.com/robertme/cec2mqtt/blob/master/README.md This command runs the latest development version of cec2mqtt using Docker. Ensure to map a data directory and the CEC device. ```console docker run -v /path/to/data/directory:/data/cec2mqtt --device=/dev/cec0 ghcr.io/robertme/cec2mqtt:edge ``` -------------------------------- ### Minimal cec2mqtt Configuration Source: https://github.com/robertme/cec2mqtt/blob/master/README.md A minimal configuration file for cec2mqtt, specifying the MQTT host and base topic. This is required for basic operation. ```yaml mqtt: host: 1.2.3.4:1883 base_topic: cec2mqtt ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.