I have a sonoff mini that is in the ceiling for a light. At the moment it appears as switch. in home assistant but I’d prefer it to be a light. since it is a light in this instance. Is this possible?
I believe this can be done in Home Assistant itself but I like to keep all the changes together so not to get confused if and when I improve or update stuff later on.
This is my current config if it helps
substitutions: ip_address: 192.168.1.XX gateway_address: 192.168.1.1 subnet_address: 255.255.255.0 dns1_address: 192.168.1.1 dns2_address: 192.168.1.1 timeout_reboot: 5min devicename: bedroom2_light_ceiling_sonoff_mini upper_devicename: Bedroom2 Light Ceiling ap_name: bdrm2_ceil_lght esphome: name: $devicename platform: ESP8266 board: esp01_1m # WiFi connection wifi: networks: - ssid: !secret wifi_ssid_NoT password: !secret wifi_password_NoT priority: 10 #enable acess point access if no wifi ap: ssid: $ap_name password: !secret ota_password manual_ip: static_ip: $ip_address gateway: $gateway_address subnet: $subnet_address dns1: $dns1_address dns2: $dns2_address reboot_timeout: $timeout_reboot # Enable logging logger: # Enable Home Assistant API api: password: !secret api_password reboot_timeout: $timeout_reboot # Enable over-the-air updates ota: password: !secret ota_password # Enable Web server web_server: port: 80 # Sync time with Home Assistant time: - platform: homeassistant id: homeassistant_time # Text sensors with general information text_sensor: - platform: version name: $upper_devicename version - platform: wifi_info ip_address: name: $upper_devicename ip ssid: name: $upper_devicename ssid bssid: name: $upper_devicename bssid sensor: # Uptime sensor - platform: uptime name: $upper_devicename uptime # WiFi Signal sensor - platform: wifi_signal name: $upper_devicename wifi signal update_interval: 10s status_led: pin: number: GPIO13 inverted: true binary_sensor: - platform: gpio name: $upper_devicename button pin: GPIO00 id: reset internal: true filters: - invert: - delayed_off: 10ms on_press: - switch.toggle: id: relay_1 - platform: gpio #name: $upper_devicename switch pin: GPIO04 id: switch_1 on_press: then: - switch.toggle: id: relay_1 # on_release: # then: # - switch.toggle: # id: relay_1 switch: - platform: gpio name: $upper_devicename switch icon: "mdi:lightbulb" pin: GPIO12 id: relay_1 restore_mode: ALWAYS_OFF