mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 07:20:01 +00:00
.devcontainer
.github
.vscode
docs
homeassistant
machine
pylint
rootfs
script
tests
auth
backports
components
abode
accuweather
acmeda
adax
adguard
advantage_air
aemet
agent_dvr
air_quality
airly
airnow
airthings
airtouch4
airvisual
airzone
alarm_control_panel
alarmdecoder
alert
alexa
almond
ambee
amberelectric
ambiclimate
ambient_station
analytics
androidtv
apache_kafka
api
api_streams
apple_tv
apprise
aprs
arcam_fmj
arlo
aseko_pool_live
asuswrt
atag
august
aurora
aurora_abb_powerone
aussie_broadband
auth
automation
awair
aws
axis
azure_devops
azure_event_hub
backup
balboa
bayesian
binary_sensor
blackbird
blebox
blink
blueprint
bluetooth_le_tracker
bmw_connected_drive
bond
bosch_shc
braviatv
broadlink
brother
brunt
bsblan
buienradar
button
caldav
calendar
camera
canary
cast
cert_expiry
climacell
climate
cloud
cloudflare
co2signal
coinbase
color_extractor
comfoconnect
command_line
compensation
config
configurator
control4
conversation
coolmaster
coronavirus
counter
cover
cpuspeed
crownstone
daikin
darksky
datadog
debugpy
deconz
default_config
demo
denonavr
derivative
device_automation
device_sun_light_trigger
device_tracker
devolo_home_control
devolo_home_network
dexcom
dhcp
diagnostics
dialogflow
directv
discovery
dlna_dmr
dlna_dms
dnsip
doorbird
dsmr
dte_energy_bridge
duckdns
dunehd
dynalite
eafm
ecobee
econet
efergy
elgato
elkm1
elmax
emonitor
emulated_hue
emulated_kasa
emulated_roku
energy
enocean
enphase_envoy
environment_canada
epson
esphome
everlights
evil_genius_labs
ezviz
faa_delays
facebook
facebox
fail2ban
fan
feedreader
ffmpeg
fido
file
filesize
filter
fireservicerota
firmata
fivem
fjaraskupan
flic
flick_electric
flipr
flo
flume
flunearyou
flux
flux_led
folder
folder_watcher
foobot
forecast_solar
forked_daapd
foscam
freebox
freedns
freedompro
fritz
fritzbox
fritzbox_callmonitor
fronius
frontend
garages_amsterdam
gdacs
generic
generic_hygrostat
generic_thermostat
geo_json_events
geo_location
geo_rss_events
geofency
geonetnz_quakes
geonetnz_volcano
gios
github
glances
goalzero
gogogate2
goodwe
google
google_assistant
google_domains
google_pubsub
google_translate
google_travel_time
google_wifi
gpslogger
graphite
gree
greeneye_monitor
group
growatt_server
guardian
habitica
hangouts
harmony
hassio
hddtemp
heos
here_travel_time
hisense_aehw4a1
history
history_stats
hive
hlk_sw16
home_connect
home_plus_control
homeassistant
homekit
homekit_controller
homematic
homematicip_cloud
homewizard
honeywell
html5
http
huawei_lte
hue
huisbaasje
humidifier
hunterdouglas_powerview
hvv_departures
hyperion
ialarm
iaqualink
icloud
ifttt
ign_sismologia
image
image_processing
imap_email_content
influxdb
input_boolean
input_button
input_datetime
input_number
input_select
input_text
insteon
integration
intellifire
intent
intent_script
ios
iotawatt
ipma
ipp
iqvia
islamic_prayer_times
iss
isy994
izone
jellyfin
jewish_calendar
juicenet
kaleidescape
keenetic_ndms2
kira
kmtronic
knx
kodi
konnected
kostal_plenticore
kraken
kulersky
lastfm
launch_library
lcn
light
litejet
litterrobot
local_file
local_ip
locative
lock
logbook
logentries
logger
logi_circle
london_air
lookin
lovelace
luftdaten
lutron_caseta
lyric
mailbox
mailgun
manual
manual_mqtt
marytts
maxcube
mazda
media_player
media_source
melcloud
melissa
meraki
met
met_eireann
meteo_france
meteoclimatic
metoffice
mfi
microsoft_face
microsoft_face_detect
microsoft_face_identify
mikrotik
mill
min_max
minecraft_server
minio
mjpeg
mobile_app
mochad
modbus
modem_callerid
modern_forms
moehlenhoff_alpha2
mold_indicator
monoprice
moon
motion_blinds
motioneye
mqtt
mqtt_eventstream
mqtt_json
mqtt_room
mqtt_statestream
mullvad
mutesync
my
myq
mysensors
mythicbeastsdns
nam
namecheapdns
nanoleaf
neato
ness_alarm
nest
netatmo
netgear
network
nexia
nextbus
nfandroidtv
nightscout
nina
nmap_tracker
no_ip
notify
notify_events
notion
nsw_fuel_station
nsw_rural_fire_service_feed
nuheat
nuki
numato
number
nut
nws
nx584
nzbget
octoprint
omnilogic
onboarding
oncue
ondilo_ico
onewire
onvif
open_meteo
openalpr_cloud
openalpr_local
openerz
opengarage
openhardwaremonitor
opentherm_gw
openuv
openweathermap
opnsense
overkiz
ovo_energy
owntracks
ozw
p1_monitor
panasonic_viera
panel_custom
panel_iframe
persistent_notification
person
philips_js
pi_hole
picnic
pilight
ping
plaato
plant
plex
plugwise
plum_lightpad
point
poolsense
powerwall
profiler
progettihwsw
prometheus
prosegur
proximity
ps4
pure_energie
push
pushbullet
pvoutput
pvpc_hourly_pricing
python_script
qld_bushfire
qwikswitch
rachio
radarr
radio_browser
rainforest_eagle
rainmachine
random
rdw
recollect_waste
recorder
reddit
remember_the_milk
remote
renault
rest
rest_command
rflink
rfxtrx
ridwell
ring
risco
rituals_perfume_genie
rmvtransport
roku
roomba
roon
rpi_power
rss_feed_template
rtsp_to_webrtc
ruckus_unleashed
safe_mode
samsungtv
scene
scrape
screenlogic
script
search
season
select
sense
senseme
sensibo
sensor
sentry
seventeentrack
sharkiq
shell_command
shelly
shopping_list
sia
sigfox
sighthound
signal_messenger
simplisafe
simulated
siren
slack
sleepiq
sma
smappee
smart_meter_texas
smarthab
smartthings
smarttub
smhi
smtp
snips
solaredge
solarlog
solax
soma
somfy
somfy_mylink
sonarr
songpal
sonos
soundtouch
spaceapi
spc
speedtestdotnet
spider
spotify
sql
squeezebox
srp_energy
ssdp
starline
startca
statistics
statsd
steamist
stookalert
stream
stt
subaru
sun
surepetcare
switch
switch_as_x
switchbot
switcher_kis
syncthing
syncthru
synology_dsm
system_bridge
system_health
system_log
tado
tag
tailscale
tasmota
tcp
telegram
tellduslive
template
tesla_wall_connector
threshold
tibber
tile
time_date
timer
tod
todoist
tolo
tomato
toon
totalconnect
tplink
traccar
trace
tractive
tradfri
trafikverket_weatherstation
transmission
transport_nsw
trend
tts
tuya
twentemilieu
twilio
twinkly
twitch
uk_transport
unifi
unifi_direct
unifiprotect
universal
upb
upcloud
updater
upnp
uptime
uptimerobot
usb
usgs_earthquakes_feed
utility_meter
uvc
vacuum
vallox
velbus
venstar
vera
verisure
version
vesync
vicare
vilfo
vizio
vlc_telnet
voicerss
volumio
vultr
wake_on_lan
wallbox
water_heater
watttime
waze_travel_time
weather
webhook
webostv
websocket_api
wemo
whirlpool
whois
wiffi
wilight
withings
wiz
wled
fixtures
__init__.py
conftest.py
test_binary_sensor.py
test_button.py
test_config_flow.py
test_coordinator.py
test_diagnostics.py
test_init.py
test_light.py
test_number.py
test_select.py
test_sensor.py
test_switch.py
wolflink
workday
worldclock
wsdot
xbox
xiaomi
xiaomi_aqara
xiaomi_miio
yale_smart_alarm
yamaha
yamaha_musiccast
yandex_transport
yandextts
yeelight
youless
zeroconf
zerproc
zha
zodiac
zone
zwave
zwave_js
zwave_me
__init__.py
conftest.py
fixtures
hassfest
helpers
mock
pylint
resources
scripts
test_util
testing_config
util
__init__.py
bandit.yaml
common.py
conftest.py
ignore_uncaught_exceptions.py
test_bootstrap.py
test_config.py
test_config_entries.py
test_core.py
test_data_entry_flow.py
test_exceptions.py
test_loader.py
test_main.py
test_requirements.py
test_runner.py
test_setup.py
test_test_fixtures.py
.core_files.yaml
.coveragerc
.dockerignore
.gitattributes
.gitignore
.hadolint.yaml
.ignore
.pre-commit-config.yaml
.prettierignore
.readthedocs.yml
.strict-typing
.yamllint
CLA.md
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile
Dockerfile.dev
LICENSE.md
MANIFEST.in
README.rst
build.yaml
codecov.yml
mypy.ini
pyproject.toml
requirements.txt
requirements_all.txt
requirements_docs.txt
requirements_test.txt
requirements_test_all.txt
requirements_test_pre_commit.txt
setup.cfg
tox.ini
211 lines
6.9 KiB
Python
211 lines
6.9 KiB
Python
"""Tests for the diagnostics data provided by the WLED integration."""
|
|
from aiohttp import ClientSession
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
|
|
|
|
|
async def test_diagnostics(
|
|
hass: HomeAssistant,
|
|
hass_client: ClientSession,
|
|
init_integration: MockConfigEntry,
|
|
):
|
|
"""Test diagnostics."""
|
|
assert await get_diagnostics_for_config_entry(
|
|
hass, hass_client, init_integration
|
|
) == {
|
|
"info": {
|
|
"architecture": "esp8266",
|
|
"arduino_core_version": "2.4.2",
|
|
"brand": "WLED",
|
|
"build_type": "bin",
|
|
"effect_count": 81,
|
|
"filesystem": None,
|
|
"free_heap": 14600,
|
|
"leds": {
|
|
"__type": "<class 'wled.models.Leds'>",
|
|
"repr": "Leds(cct=False, count=30, fps=None, max_power=850, max_segments=10, power=470, rgbw=False, wv=True)",
|
|
},
|
|
"live_ip": "Unknown",
|
|
"live_mode": "Unknown",
|
|
"live": False,
|
|
"mac_address": "aabbccddeeff",
|
|
"name": "WLED RGB Light",
|
|
"pallet_count": 50,
|
|
"product": "DIY light",
|
|
"udp_port": 21324,
|
|
"uptime": 32,
|
|
"version_id": 1909122,
|
|
"version": "0.8.5",
|
|
"version_latest_beta": "0.13.0b1",
|
|
"version_latest_stable": "0.12.0",
|
|
"websocket": None,
|
|
"wifi": "**REDACTED**",
|
|
},
|
|
"state": {
|
|
"brightness": 127,
|
|
"nightlight": {
|
|
"__type": "<class 'wled.models.Nightlight'>",
|
|
"repr": "Nightlight(duration=60, fade=True, on=False, mode=<NightlightMode.FADE: 1>, target_brightness=0)",
|
|
},
|
|
"on": True,
|
|
"playlist": -1,
|
|
"preset": -1,
|
|
"segments": [
|
|
{
|
|
"__type": "<class 'wled.models.Segment'>",
|
|
"repr": "Segment(brightness=127, clones=-1, color_primary=(255, 159, 0), color_secondary=(0, 0, 0), color_tertiary=(0, 0, 0), effect=Effect(effect_id=0, name='Solid'), intensity=128, length=20, on=True, palette=Palette(name='Default', palette_id=0), reverse=False, segment_id=0, selected=True, speed=32, start=0, stop=19)",
|
|
},
|
|
{
|
|
"__type": "<class 'wled.models.Segment'>",
|
|
"repr": "Segment(brightness=127, clones=-1, color_primary=(0, 255, 123), color_secondary=(0, 0, 0), color_tertiary=(0, 0, 0), effect=Effect(effect_id=1, name='Blink'), intensity=64, length=10, on=True, palette=Palette(name='Random Cycle', palette_id=1), reverse=True, segment_id=1, selected=True, speed=16, start=20, stop=30)",
|
|
},
|
|
],
|
|
"sync": {
|
|
"__type": "<class 'wled.models.Sync'>",
|
|
"repr": "Sync(receive=True, send=False)",
|
|
},
|
|
"transition": 7,
|
|
"lor": 0,
|
|
},
|
|
"effects": {
|
|
"27": "Android",
|
|
"68": "BPM",
|
|
"1": "Blink",
|
|
"26": "Blink Rainbow",
|
|
"2": "Breathe",
|
|
"13": "Chase",
|
|
"28": "Chase",
|
|
"31": "Chase Flash",
|
|
"32": "Chase Flash Rnd",
|
|
"14": "Chase Rainbow",
|
|
"30": "Chase Rainbow",
|
|
"29": "Chase Random",
|
|
"52": "Circus",
|
|
"34": "Colorful",
|
|
"8": "Colorloop",
|
|
"74": "Colortwinkle",
|
|
"67": "Colorwaves",
|
|
"21": "Dark Sparkle",
|
|
"18": "Dissolve",
|
|
"19": "Dissolve Rnd",
|
|
"11": "Dual Scan",
|
|
"60": "Dual Scanner",
|
|
"7": "Dynamic",
|
|
"12": "Fade",
|
|
"69": "Fill Noise",
|
|
"66": "Fire 2012",
|
|
"45": "Fire Flicker",
|
|
"42": "Fireworks",
|
|
"46": "Gradient",
|
|
"53": "Halloween",
|
|
"58": "ICU",
|
|
"49": "In In",
|
|
"48": "In Out",
|
|
"64": "Juggle",
|
|
"75": "Lake",
|
|
"41": "Lighthouse",
|
|
"57": "Lightning",
|
|
"47": "Loading",
|
|
"25": "Mega Strobe",
|
|
"44": "Merry Christmas",
|
|
"76": "Meteor",
|
|
"59": "Multi Comet",
|
|
"70": "Noise 1",
|
|
"71": "Noise 2",
|
|
"72": "Noise 3",
|
|
"73": "Noise 4",
|
|
"62": "Oscillate",
|
|
"51": "Out In",
|
|
"50": "Out Out",
|
|
"65": "Palette",
|
|
"63": "Pride 2015",
|
|
"78": "Railway",
|
|
"43": "Rain",
|
|
"9": "Rainbow",
|
|
"33": "Rainbow Runner",
|
|
"5": "Random Colors",
|
|
"38": "Red & Blue",
|
|
"79": "Ripple",
|
|
"15": "Running",
|
|
"37": "Running 2",
|
|
"16": "Saw",
|
|
"10": "Scan",
|
|
"40": "Scanner",
|
|
"77": "Smooth Meteor",
|
|
"0": "Solid",
|
|
"20": "Sparkle",
|
|
"22": "Sparkle+",
|
|
"39": "Stream",
|
|
"61": "Stream 2",
|
|
"23": "Strobe",
|
|
"24": "Strobe Rainbow",
|
|
"6": "Sweep",
|
|
"36": "Sweep Random",
|
|
"35": "Traffic Light",
|
|
"54": "Tri Chase",
|
|
"56": "Tri Fade",
|
|
"55": "Tri Wipe",
|
|
"17": "Twinkle",
|
|
"80": "Twinklefox",
|
|
"3": "Wipe",
|
|
"4": "Wipe Random",
|
|
},
|
|
"palettes": {
|
|
"18": "Analogous",
|
|
"46": "April Night",
|
|
"39": "Autumn",
|
|
"3": "Based on Primary",
|
|
"5": "Based on Set",
|
|
"26": "Beach",
|
|
"22": "Beech",
|
|
"15": "Breeze",
|
|
"48": "C9",
|
|
"7": "Cloud",
|
|
"37": "Cyane",
|
|
"0": "Default",
|
|
"24": "Departure",
|
|
"30": "Drywet",
|
|
"35": "Fire",
|
|
"10": "Forest",
|
|
"32": "Grintage",
|
|
"28": "Hult",
|
|
"29": "Hult 64",
|
|
"36": "Icefire",
|
|
"31": "Jul",
|
|
"25": "Landscape",
|
|
"8": "Lava",
|
|
"38": "Light Pink",
|
|
"40": "Magenta",
|
|
"41": "Magred",
|
|
"9": "Ocean",
|
|
"44": "Orange & Teal",
|
|
"47": "Orangery",
|
|
"6": "Party",
|
|
"20": "Pastel",
|
|
"2": "Primary Color",
|
|
"11": "Rainbow",
|
|
"12": "Rainbow Bands",
|
|
"1": "Random Cycle",
|
|
"16": "Red & Blue",
|
|
"33": "Rewhi",
|
|
"14": "Rivendell",
|
|
"49": "Sakura",
|
|
"4": "Set Colors",
|
|
"27": "Sherbet",
|
|
"19": "Splash",
|
|
"13": "Sunset",
|
|
"21": "Sunset 2",
|
|
"34": "Tertiary",
|
|
"45": "Tiamat",
|
|
"23": "Vintage",
|
|
"43": "Yelblu",
|
|
"17": "Yellowout",
|
|
"42": "Yelmag",
|
|
},
|
|
"playlists": {},
|
|
"presets": {},
|
|
}
|