bigmoby / fglair_for_homeassistant

❄️ FGLair heat pump controller integration
MIT License
48 stars 4 forks source link

KeyError: 'value' on new integration #151

Closed picnicbob closed 3 weeks ago

picnicbob commented 1 month ago

System Health details

System Information

version core-2024.7.2
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.1.21-v8+
arch aarch64
timezone America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4913 Installed Version | 1.34.0 Stage | running Available Repositories | 1387 Downloaded Repositories | 3
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 2 -- | -- resources | 0 views | 0 mode | storage
Recorder oldest_recorder_run | July 3, 2024 at 1:50 PM -- | -- current_recorder_run | July 17, 2024 at 8:52 AM estimated_db_size | 12.64 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

New user in us region and device does not appear. Logs show KeyError: 'value' after attempting to set display_temperature_value = self._display_temperature["value"]

Reproduction steps

  1. Install integration
  2. Enter FGLair app credentials, "us" region and "token.txt"

Debug logs

homeassistant  | [09:34:14] INFO: Home Assistant Core finish process exit code 100
homeassistant  | 2024-07-17 09:34:21.005 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fglair_heatpump_controller which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
homeassistant  | 2024-07-17 09:34:21.008 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
homeassistant  | 2024-07-17 09:34:21.010 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fujitsu_airstage which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
homeassistant  | 2024-07-17 09:34:21.013 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
homeassistant  | 2024-07-17 09:34:21.650 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.16 seconds
homeassistant  | 2024-07-17 09:34:21.651 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.16 seconds
homeassistant  | 2024-07-17 09:34:21.651 INFO (MainThread) [homeassistant.bootstrap] Setting up frontend, recorder: {'frontend', 'recorder'}
homeassistant  | 2024-07-17 09:34:21.652 INFO (MainThread) [homeassistant.setup] Setting up http
homeassistant  | 2024-07-17 09:34:21.653 INFO (MainThread) [homeassistant.setup] Setting up device_automation
homeassistant  | 2024-07-17 09:34:21.653 INFO (MainThread) [homeassistant.setup] Setup of domain device_automation took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.673 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.02 seconds
homeassistant  | 2024-07-17 09:34:21.676 INFO (MainThread) [homeassistant.setup] Setting up auth
homeassistant  | 2024-07-17 09:34:21.683 INFO (MainThread) [homeassistant.setup] Setup of domain auth took 0.01 seconds
homeassistant  | 2024-07-17 09:34:21.684 INFO (MainThread) [homeassistant.setup] Setting up config
homeassistant  | 2024-07-17 09:34:21.691 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.01 seconds
homeassistant  | 2024-07-17 09:34:21.691 INFO (MainThread) [homeassistant.setup] Setting up diagnostics
homeassistant  | 2024-07-17 09:34:21.695 INFO (MainThread) [homeassistant.setup] Setup of domain diagnostics took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.695 INFO (MainThread) [homeassistant.setup] Setting up file_upload
homeassistant  | 2024-07-17 09:34:21.696 INFO (MainThread) [homeassistant.setup] Setup of domain file_upload took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.696 INFO (MainThread) [homeassistant.setup] Setting up image_upload
homeassistant  | 2024-07-17 09:34:21.699 INFO (MainThread) [homeassistant.setup] Setup of domain image_upload took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.700 INFO (MainThread) [homeassistant.setup] Setting up repairs
homeassistant  | 2024-07-17 09:34:21.702 INFO (MainThread) [homeassistant.setup] Setup of domain repairs took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.703 INFO (MainThread) [homeassistant.setup] Setting up recorder
homeassistant  | 2024-07-17 09:34:21.707 INFO (MainThread) [homeassistant.setup] Setting up api
homeassistant  | 2024-07-17 09:34:21.711 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.713 INFO (MainThread) [homeassistant.setup] Setting up person
homeassistant  | 2024-07-17 09:34:21.718 INFO (MainThread) [homeassistant.setup] Setup of domain person took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.719 INFO (MainThread) [homeassistant.setup] Setting up onboarding
homeassistant  | 2024-07-17 09:34:21.719 INFO (MainThread) [homeassistant.setup] Setup of domain onboarding took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.720 INFO (MainThread) [homeassistant.setup] Setting up lovelace
homeassistant  | 2024-07-17 09:34:21.723 INFO (MainThread) [homeassistant.setup] Setup of domain lovelace took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.800 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.10 seconds
homeassistant  | 2024-07-17 09:34:21.801 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
homeassistant  | 2024-07-17 09:34:21.801 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.802 INFO (MainThread) [homeassistant.setup] Setting up search
homeassistant  | 2024-07-17 09:34:21.802 INFO (MainThread) [homeassistant.setup] Setup of domain search took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.803 INFO (MainThread) [homeassistant.setup] Setting up frontend
homeassistant  | 2024-07-17 09:34:21.815 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.01 seconds
homeassistant  | 2024-07-17 09:34:21.817 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 1: {'usb', 'api', 'bluetooth', 'ssdp', 'webhook', 'repairs', 'http', 'dhcp', 'network', 'cloud', 'websocket_api', 'zeroconf', 'auth'}
homeassistant  | 2024-07-17 09:34:21.821 INFO (MainThread) [homeassistant.setup] Setting up network
homeassistant  | 2024-07-17 09:34:21.827 INFO (MainThread) [homeassistant.setup] Setup of domain network took 0.01 seconds
homeassistant  | 2024-07-17 09:34:21.828 INFO (MainThread) [homeassistant.setup] Setting up webhook
homeassistant  | 2024-07-17 09:34:21.829 INFO (MainThread) [homeassistant.setup] Setup of domain webhook took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.836 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
homeassistant  | 2024-07-17 09:34:21.838 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.02 seconds
homeassistant  | 2024-07-17 09:34:21.859 INFO (MainThread) [homeassistant.setup] Setting up usb
homeassistant  | 2024-07-17 09:34:21.859 INFO (MainThread) [homeassistant.setup] Setup of domain usb took 0.00 seconds
homeassistant  | 2024-07-17 09:34:21.950 INFO (MainThread) [homeassistant.setup] Setting up ssdp
homeassistant  | 2024-07-17 09:34:21.960 INFO (MainThread) [homeassistant.setup] Setup of domain ssdp took 0.01 seconds
homeassistant  | 2024-07-17 09:34:22.015 INFO (MainThread) [homeassistant.setup] Setting up dhcp
homeassistant  | 2024-07-17 09:34:22.015 INFO (MainThread) [homeassistant.setup] Setup of domain dhcp took 0.00 seconds
homeassistant  | 2024-07-17 09:34:22.814 INFO (MainThread) [homeassistant.setup] Setting up cloud
homeassistant  | 2024-07-17 09:34:22.829 INFO (MainThread) [homeassistant.setup] Setting up ffmpeg
homeassistant  | 2024-07-17 09:34:22.830 INFO (MainThread) [homeassistant.setup] Setup of domain ffmpeg took 0.00 seconds
homeassistant  | 2024-07-17 09:34:22.831 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.02 seconds
homeassistant  | 2024-07-17 09:34:22.915 INFO (MainThread) [homeassistant.setup] Setting up zeroconf
homeassistant  | 2024-07-17 09:34:22.921 INFO (MainThread) [zeroconf] Address in use when adding (('fe80::2ed2:b550:8a6c:24e8', 0, 2), 2) to multicast group, it is expected to happen on some systems
homeassistant  | 2024-07-17 09:34:22.930 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
homeassistant  | 2024-07-17 09:34:22.930 INFO (MainThread) [homeassistant.setup] Setup of domain zeroconf took 0.01 seconds
homeassistant  | 2024-07-17 09:34:23.151 INFO (MainThread) [homeassistant.setup] Setting up bluetooth
homeassistant  | 2024-07-17 09:34:23.250 INFO (MainThread) [homeassistant.setup] Setup of domain bluetooth took 0.10 seconds
homeassistant  | 2024-07-17 09:34:23.253 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'automation', 'device_automation', 'broadlink', 'stt', 'my', 'input_text', 'tag', 'zone', 'timer', 'thread', 'homekit', 'input_number', 'media_source', 'logbook', 'input_select', 'default_config', 'input_datetime', 'counter', 'fujitsu_airstage', 'hacs', 'smartir', 'stream', 'map', 'image_upload', 'group', 'intent', 'onboarding', 'tts', 'sun', 'persistent_notification', 'input_button', 'application_credentials', 'assist_pipeline', 'hardware', 'wake_word', 'person', 'history', 'blueprint', 'system_health', 'trace', 'homeassistant_alerts', 'climate', 'schedule', 'input_boolean', 'search', 'scene', 'analytics', 'ffmpeg', 'config', 'diagnostics', 'script', 'mobile_app', 'file_upload', 'backup', 'lovelace', 'fglair_heatpump_controller', 'conversation', 'energy'}
homeassistant  | 2024-07-17 09:34:23.256 INFO (MainThread) [homeassistant.setup] Setting up stt
homeassistant  | 2024-07-17 09:34:23.257 INFO (MainThread) [homeassistant.setup] Setup of domain stt took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.258 INFO (MainThread) [homeassistant.setup] Setting up wake_word
homeassistant  | 2024-07-17 09:34:23.261 INFO (MainThread) [homeassistant.setup] Setup of domain wake_word took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.263 INFO (MainThread) [homeassistant.setup] Setting up scene
homeassistant  | 2024-07-17 09:34:23.272 INFO (MainThread) [homeassistant.components.scene] Setting up homeassistant.scene
homeassistant  | 2024-07-17 09:34:23.487 INFO (MainThread) [homeassistant.setup] Setup of domain scene took 0.21 seconds
homeassistant  | 2024-07-17 09:34:23.487 INFO (MainThread) [homeassistant.setup] Setting up blueprint
homeassistant  | 2024-07-17 09:34:23.489 INFO (MainThread) [homeassistant.setup] Setup of domain blueprint took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.490 INFO (MainThread) [homeassistant.setup] Setting up trace
homeassistant  | 2024-07-17 09:34:23.490 INFO (MainThread) [homeassistant.setup] Setup of domain trace took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.491 INFO (MainThread) [homeassistant.setup] Setting up automation
homeassistant  | 2024-07-17 09:34:23.494 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.495 INFO (MainThread) [homeassistant.setup] Setting up input_button
homeassistant  | 2024-07-17 09:34:23.502 INFO (MainThread) [homeassistant.setup] Setup of domain input_button took 0.01 seconds
homeassistant  | 2024-07-17 09:34:23.503 INFO (MainThread) [homeassistant.setup] Setting up history
homeassistant  | 2024-07-17 09:34:23.505 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.506 INFO (MainThread) [homeassistant.setup] Setting up zone
homeassistant  | 2024-07-17 09:34:23.509 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.510 INFO (MainThread) [homeassistant.setup] Setting up system_health
homeassistant  | 2024-07-17 09:34:23.510 INFO (MainThread) [homeassistant.setup] Setup of domain system_health took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.515 INFO (MainThread) [homeassistant.setup] Setting up input_number
homeassistant  | 2024-07-17 09:34:23.519 INFO (MainThread) [homeassistant.setup] Setup of domain input_number took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.519 INFO (MainThread) [homeassistant.setup] Setting up media_source
homeassistant  | 2024-07-17 09:34:23.521 INFO (MainThread) [homeassistant.setup] Setup of domain media_source took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.523 INFO (MainThread) [homeassistant.setup] Setting up input_boolean
homeassistant  | 2024-07-17 09:34:23.525 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.525 INFO (MainThread) [homeassistant.setup] Setting up logbook
homeassistant  | 2024-07-17 09:34:23.527 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.527 INFO (MainThread) [homeassistant.setup] Setting up input_select
homeassistant  | 2024-07-17 09:34:23.538 INFO (MainThread) [homeassistant.setup] Setup of domain input_select took 0.01 seconds
homeassistant  | 2024-07-17 09:34:23.539 INFO (MainThread) [homeassistant.setup] Setting up stream
homeassistant  | 2024-07-17 09:34:23.553 INFO (MainThread) [homeassistant.setup] Setting up script
homeassistant  | 2024-07-17 09:34:23.570 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.02 seconds
homeassistant  | 2024-07-17 09:34:23.572 INFO (MainThread) [homeassistant.setup] Setting up group
homeassistant  | 2024-07-17 09:34:23.575 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.576 INFO (MainThread) [homeassistant.setup] Setting up timer
homeassistant  | 2024-07-17 09:34:23.580 INFO (MainThread) [homeassistant.setup] Setup of domain timer took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.751 INFO (MainThread) [homeassistant.setup] Setting up tts
homeassistant  | 2024-07-17 09:34:23.808 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.06 seconds
homeassistant  | 2024-07-17 09:34:23.809 INFO (MainThread) [homeassistant.setup] Setting up intent
homeassistant  | 2024-07-17 09:34:23.810 INFO (MainThread) [homeassistant.setup] Setup of domain intent took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.811 INFO (MainThread) [homeassistant.setup] Setting up conversation
homeassistant  | 2024-07-17 09:34:23.813 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.00 seconds
homeassistant  | 2024-07-17 09:34:23.816 INFO (MainThread) [homeassistant.setup] Setting up assist_pipeline
homeassistant  | 2024-07-17 09:34:23.819 INFO (MainThread) [homeassistant.setup] Setup of domain assist_pipeline took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.057 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_OFF was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.062 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.072 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_COOL was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.COOL instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.076 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_DRY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.DRY instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.083 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.088 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.094 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.099 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.106 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:24.132 INFO (MainThread) [homeassistant.setup] Setting up climate
homeassistant  | 2024-07-17 09:34:24.136 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.159 INFO (MainThread) [homeassistant.setup] Setting up sun
homeassistant  | 2024-07-17 09:34:24.160 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.165 INFO (MainThread) [homeassistant.setup] Setting up sensor
homeassistant  | 2024-07-17 09:34:24.166 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.167 INFO (MainThread) [homeassistant.components.sensor] Setting up sun.sensor
homeassistant  | 2024-07-17 09:34:24.264 INFO (MainThread) [homeassistant.setup] Setup of domain stream took 0.72 seconds
homeassistant  | 2024-07-17 09:34:24.286 INFO (MainThread) [homeassistant.setup] Setting up broadlink
homeassistant  | 2024-07-17 09:34:24.289 INFO (MainThread) [homeassistant.setup] Setup of domain broadlink took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.304 INFO (MainThread) [homeassistant.setup] Setting up my
homeassistant  | 2024-07-17 09:34:24.305 INFO (MainThread) [homeassistant.setup] Setup of domain my took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.319 INFO (MainThread) [homeassistant.setup] Setting up application_credentials
homeassistant  | 2024-07-17 09:34:24.321 INFO (MainThread) [homeassistant.setup] Setup of domain application_credentials took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.347 INFO (MainThread) [homeassistant.setup] Setting up hardware
homeassistant  | 2024-07-17 09:34:24.358 INFO (MainThread) [homeassistant.setup] Setting up input_text
homeassistant  | 2024-07-17 09:34:24.369 INFO (MainThread) [homeassistant.setup] Setup of domain input_text took 0.01 seconds
homeassistant  | 2024-07-17 09:34:24.398 INFO (MainThread) [homeassistant.setup] Setting up tag
homeassistant  | 2024-07-17 09:34:24.401 INFO (MainThread) [homeassistant.setup] Setup of domain tag took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.433 INFO (MainThread) [homeassistant.setup] Setup of domain hardware took 0.09 seconds
homeassistant  | 2024-07-17 09:34:24.443 INFO (MainThread) [homeassistant.setup] Setting up homeassistant_alerts
homeassistant  | 2024-07-17 09:34:24.444 INFO (MainThread) [homeassistant.setup] Setup of domain homeassistant_alerts took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.512 INFO (MainThread) [homeassistant.setup] Setting up thread
homeassistant  | 2024-07-17 09:34:24.512 INFO (MainThread) [homeassistant.setup] Setup of domain thread took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.670 INFO (MainThread) [homeassistant.setup] Setting up homekit
homeassistant  | 2024-07-17 09:34:24.677 INFO (MainThread) [homeassistant.setup] Setup of domain homekit took 0.01 seconds
homeassistant  | 2024-07-17 09:34:24.687 INFO (MainThread) [homeassistant.setup] Setting up schedule
homeassistant  | 2024-07-17 09:34:24.692 INFO (MainThread) [homeassistant.setup] Setup of domain schedule took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.716 INFO (MainThread) [homeassistant.setup] Setting up energy
homeassistant  | 2024-07-17 09:34:24.717 INFO (MainThread) [homeassistant.setup] Setup of domain energy took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.722 INFO (MainThread) [homeassistant.setup] Setting up map
homeassistant  | 2024-07-17 09:34:24.723 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.729 INFO (MainThread) [homeassistant.setup] Setting up input_datetime
homeassistant  | 2024-07-17 09:34:24.732 INFO (MainThread) [homeassistant.setup] Setup of domain input_datetime took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.737 INFO (MainThread) [homeassistant.setup] Setting up counter
homeassistant  | 2024-07-17 09:34:24.741 INFO (MainThread) [homeassistant.setup] Setup of domain counter took 0.00 seconds
homeassistant  | 2024-07-17 09:34:24.754 INFO (MainThread) [homeassistant.setup] Setting up fujitsu_airstage
homeassistant  | 2024-07-17 09:34:24.755 INFO (MainThread) [homeassistant.setup] Setup of domain fujitsu_airstage took 0.00 seconds
homeassistant  | 2024-07-17 09:34:25.573 INFO (MainThread) [homeassistant.setup] Setting up hacs
homeassistant  | 2024-07-17 09:34:25.573 INFO (MainThread) [homeassistant.setup] Setup of domain hacs took 0.00 seconds
homeassistant  | 2024-07-17 09:34:25.573 INFO (MainThread) [custom_components.hacs] 
homeassistant  | -------------------------------------------------------------------
homeassistant  | HACS (Home Assistant Community Store)
homeassistant  | 
homeassistant  | Version: 1.34.0
homeassistant  | This is a custom integration
homeassistant  | If you have any issues with this you need to open an issue here:
homeassistant  | https://github.com/hacs/integration/issues
homeassistant  | -------------------------------------------------------------------
homeassistant  | 
homeassistant  | 2024-07-17 09:34:25.576 INFO (MainThread) [homeassistant.setup] Setting up smartir
homeassistant  | 2024-07-17 09:34:25.643 INFO (MainThread) [homeassistant.setup] Setting up backup
homeassistant  | 2024-07-17 09:34:25.645 INFO (MainThread) [homeassistant.setup] Setup of domain backup took 0.00 seconds
homeassistant  | 2024-07-17 09:34:25.646 INFO (MainThread) [homeassistant.setup] Setting up fglair_heatpump_controller
homeassistant  | 2024-07-17 09:34:25.646 INFO (MainThread) [homeassistant.setup] Setup of domain fglair_heatpump_controller took 0.00 seconds
homeassistant  | 2024-07-17 09:34:25.646 INFO (MainThread) [custom_components.fglair_heatpump_controller] 
homeassistant  | -------------------------------------------------------------------
homeassistant  | FGLair Home Assistant Integration
homeassistant  | Version: 0.3.14
homeassistant  | This is a custom integration!
homeassistant  | If you have any issues with this you need to open an issue here:
homeassistant  | https://github.com/bigmoby/fglair_for_homeassistant/issues
homeassistant  | -------------------------------------------------------------------
homeassistant  | 
homeassistant  | 2024-07-17 09:34:25.650 DEBUG (MainThread) [custom_components.hacs] Configuration type: config_entry
homeassistant  | 2024-07-17 09:34:25.696 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore started
homeassistant  | 2024-07-17 09:34:26.523 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore done
homeassistant  | 2024-07-17 09:34:26.540 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'smartir' accesses hass.components.persistent_notification. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from persistent_notification directly at custom_components/smartir/__init__.py, line 94: hass.components.persistent_notification.async_create(, please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.546 INFO (MainThread) [homeassistant.setup] Setup of domain smartir took 0.97 seconds
homeassistant  | 2024-07-17 09:34:26.550 INFO (MainThread) [homeassistant.components.climate] Setting up smartir.climate
homeassistant  | 2024-07-17 09:34:26.573 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/smartir/codes/climate/9999.json',) inside the event loop by custom integration 'smartir' at custom_components/smartir/climate.py, line 85: with open(device_json_path) as j: (offender: /config/custom_components/smartir/climate.py, line 85: with open(device_json_path) as j:), please report it to the author of the 'smartir' custom integration
homeassistant  | For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "<frozen runpy>", line 198, in _run_module_as_main
homeassistant  |   File "<frozen runpy>", line 88, in _run_code
homeassistant  |   File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
homeassistant  |     sys.exit(main())
homeassistant  |   File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
homeassistant  |     exit_code = runner.run(runtime_conf)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
homeassistant  |     return loop.run_until_complete(setup_and_run_hass(runtime_config))
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
homeassistant  |     self.run_forever()
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
homeassistant  |     self._run_once()
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
homeassistant  |     handle._run()
homeassistant  |   File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
homeassistant  |     self._context.run(self._callback, *self._args)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 318, in async_setup_platform
homeassistant  |     await self._platforms[key].async_setup(platform_config, discovery_info)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 301, in async_setup
homeassistant  |     await self._async_setup_platform(async_create_setup_awaitable)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
homeassistant  |     awaitable = create_eager_task(awaitable, loop=hass.loop)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task
homeassistant  |     return Task(coro, loop=loop, name=name, eager_start=True)
homeassistant  |   File "/config/custom_components/smartir/climate.py", line 85, in async_setup_platform
homeassistant  |     with open(device_json_path) as j:
homeassistant  | 
homeassistant  | 2024-07-17 09:34:26.579 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE: 9>, please report it to the author of the 'smartir' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
homeassistant  | 2024-07-17 09:34:26.580 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.580 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.582 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, heat, cool, dry, fan_only, heat_cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.586 INFO (MainThread) [homeassistant.components.climate] Setting up smartir.climate
homeassistant  | 2024-07-17 09:34:26.599 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE: 9>, please report it to the author of the 'smartir' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
homeassistant  | 2024-07-17 09:34:26.599 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.599 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.599 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, heat, cool, dry, fan_only, heat_cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.601 INFO (MainThread) [homeassistant.components.climate] Setting up smartir.climate
homeassistant  | 2024-07-17 09:34:26.613 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE: 9>, please report it to the author of the 'smartir' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
homeassistant  | 2024-07-17 09:34:26.613 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.614 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.614 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, heat, cool, dry, fan_only, heat_cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.616 INFO (MainThread) [homeassistant.components.climate] Setting up smartir.climate
homeassistant  | 2024-07-17 09:34:26.625 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE: 9>, please report it to the author of the 'smartir' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
homeassistant  | 2024-07-17 09:34:26.626 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.626 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.626 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, heat, cool, dry, fan_only, heat_cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
homeassistant  | 2024-07-17 09:34:26.663 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
homeassistant  | 2024-07-17 09:34:26.664 INFO (MainThread) [homeassistant.setup] Setting up notify
homeassistant  | 2024-07-17 09:34:26.667 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.670 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 0.01 seconds
homeassistant  | 2024-07-17 09:34:26.671 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor
homeassistant  | 2024-07-17 09:34:26.672 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.673 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up mobile_app.binary_sensor
homeassistant  | 2024-07-17 09:34:26.675 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
homeassistant  | 2024-07-17 09:34:26.676 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.677 INFO (MainThread) [homeassistant.components.device_tracker] Setting up mobile_app.device_tracker
homeassistant  | 2024-07-17 09:34:26.678 INFO (MainThread) [homeassistant.components.sensor] Setting up mobile_app.sensor
homeassistant  | 2024-07-17 09:34:26.696 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
homeassistant  | 2024-07-17 09:34:26.717 INFO (MainThread) [homeassistant.setup] Setting up default_config
homeassistant  | 2024-07-17 09:34:26.718 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.727 INFO (MainThread) [homeassistant.setup] Setting up remote
homeassistant  | 2024-07-17 09:34:26.730 INFO (MainThread) [homeassistant.setup] Setup of domain remote took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.731 INFO (MainThread) [homeassistant.components.remote] Setting up broadlink.remote
homeassistant  | 2024-07-17 09:34:26.734 INFO (MainThread) [homeassistant.setup] Setting up switch
homeassistant  | 2024-07-17 09:34:26.735 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.736 INFO (MainThread) [homeassistant.components.switch] Setting up broadlink.switch
homeassistant  | 2024-07-17 09:34:26.739 INFO (MainThread) [homeassistant.components.remote] Setting up broadlink.remote
homeassistant  | 2024-07-17 09:34:26.741 INFO (MainThread) [homeassistant.components.switch] Setting up broadlink.switch
homeassistant  | 2024-07-17 09:34:26.741 INFO (MainThread) [homeassistant.components.remote] Setting up broadlink.remote
homeassistant  | 2024-07-17 09:34:26.743 INFO (MainThread) [homeassistant.components.switch] Setting up broadlink.switch
homeassistant  | 2024-07-17 09:34:26.744 INFO (MainThread) [homeassistant.components.remote] Setting up broadlink.remote
homeassistant  | 2024-07-17 09:34:26.745 INFO (MainThread) [homeassistant.components.switch] Setting up broadlink.switch
homeassistant  | 2024-07-17 09:34:26.808 INFO (MainThread) [homeassistant.components.sensor] Setting up energy.sensor
homeassistant  | 2024-07-17 09:34:26.810 DEBUG (MainThread) [custom_components.hacs] Can update 383 repositories
homeassistant  | 2024-07-17 09:34:26.812 INFO (MainThread) [custom_components.hacs] Enable category: integration
homeassistant  | 2024-07-17 09:34:26.814 INFO (MainThread) [custom_components.hacs] Enable category: plugin
homeassistant  | 2024-07-17 09:34:26.815 INFO (MainThread) [custom_components.hacs] Enable category: theme
homeassistant  | 2024-07-17 09:34:26.828 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/frontend", "/config/custom_components/hacs/hacs_frontend", False)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 54: hass.http.register_static_path(f"{URL_BASE}/frontend", locate_dir(), cache_headers=False), please create a bug report at https://github.com/hacs/integration/issues
homeassistant  | 2024-07-17 09:34:26.838 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/iconset.js", "/config/custom_components/hacs/iconset.js", True)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 57: hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
homeassistant  | 2024-07-17 09:34:26.845 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
homeassistant  | 2024-07-17 09:34:26.853 INFO (MainThread) [homeassistant.setup] Setting up analytics
homeassistant  | 2024-07-17 09:34:26.854 INFO (MainThread) [homeassistant.setup] Setup of domain analytics took 0.00 seconds
homeassistant  | 2024-07-17 09:34:26.868 INFO (MainThread) [homeassistant.components.sensor] Setting up hacs.sensor
homeassistant  | 2024-07-17 09:34:26.869 INFO (MainThread) [custom_components.hacs] Stage changed: setup
homeassistant  | 2024-07-17 09:34:26.871 INFO (MainThread) [custom_components.hacs] Stage changed: waiting
homeassistant  | 2024-07-17 09:34:26.871 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts
homeassistant  | 2024-07-17 09:34:26.882 WARNING (SyncWorker_9) [py.warnings] /usr/local/lib/python3.12/json/__init__.py:180: RuntimeWarning: coroutine '_make_delegate_method.<locals>.method' was never awaited
homeassistant  |   fp.write(chunk)
homeassistant  | 
homeassistant  | 2024-07-17 09:34:27.043 DEBUG (MainThread) [custom_components.fglair_heatpump_controller] Finished fetching fglair_heatpump_controller data in 1.396 seconds (success: True)
homeassistant  | 2024-07-17 09:34:27.053 INFO (MainThread) [homeassistant.components.climate] Setting up fglair_heatpump_controller.climate
homeassistant  | 2024-07-17 09:34:27.053 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate async_setup_entry called
homeassistant  | 2024-07-17 09:34:27.722 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] async_setup_entry called with AC000W003109682 - us - token.txt - 2.0  
homeassistant  | 2024-07-17 09:34:27.722 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate init called for dsn: AC000W003109682
homeassistant  | 2024-07-17 09:34:27.723 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Update FujitsuClimate device by async_update
homeassistant  | 2024-07-17 09:34:28.711 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate return device name [AC-UTY-a0c9a00ad690]
homeassistant  | 2024-07-17 09:34:28.711 ERROR (MainThread) [homeassistant.components.climate] fglair_heatpump_controller: Error on device update!
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
homeassistant  |     await entity.async_device_update(warning=False)
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
homeassistant  |     await self.async_update()
homeassistant  |   File "/config/custom_components/fglair_heatpump_controller/climate.py", line 419, in async_update
homeassistant  |     await self._fujitsu_device.async_get_display_temperature_degree()
homeassistant  |   File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 329, in async_get_display_temperature_degree
homeassistant  |     display_temperature_value = self._display_temperature["value"]
homeassistant  |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
homeassistant  | KeyError: 'value'

Diagnostics dump

No response

vdkstefaan83 commented 1 month ago

I got the same error

johncosker commented 1 month ago

Same

johncosker commented 1 month ago

Here's my bandaid fix to work around it:

on my HA server, I edited /config/custom_components/fglair_heatpump_controller/climate.py by commenting out lines 418 through 420:

image

probably could do a try/except but I didn't bother since I don't care about displaying the current temp.

Then in def swing_mode() around line 490, i added a hard code to set the swing mode and an early return to avoid going into more code that crashes:

image

Of course this is a very crude bandaid fix but it got my devices to load correctly on my dashboard and i can set the mode and temp which is all I need.

bigmoby commented 1 month ago

Thank you guys I've to analize it better. I suppose it's caused by some limitations related by AC device.

Blizzke commented 1 month ago

Par me doing something wrong in updating the integration the problem is still there for 0.3.16:

2024-08-03 00:15:29.158 ERROR (MainThread) [homeassistant.components.climate] Error adding entity None for domain climate with platform fglair_heatpump_controller
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 816, in _async_add_entity
    capabilities=entity.capability_attributes,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 318, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 511, in capability_attributes
    data[ATTR_SWING_MODES] = self.swing_modes
                             ^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 318, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 533, in swing_modes
    vert_pos_list: list[str] = self._fujitsu_device.vane_vertical_positions()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 219, in vane_vertical_positions
    array = np.arange(1, self.get_af_vertical_num_dir()["value"] + 1)
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value

Edit: If there is something I can do to help you diagnose, please don't hesitate to let me know by the way. I have 3 aircons in the application but it's already failing on the first one it encounters as none are added.

picnicbob commented 1 month ago

Thank you guys I've to analize it better. I suppose it's caused by some limitations related by AC device.

I’m fairly certain the model I have does not provide the room temp.

johncosker commented 1 month ago

The overarching issue is that different models don't support all properties and the underlying API library isn't returning None correctly in some cases when the value isn't present in the JSON received from the API request.

For my case it was missing display temp and swing mode, for others it might be different.

Blizzke commented 1 month ago

I do not have a display on any of the 3 aircons. So I don't expect any of them to return the room temperature. Only one has horizontal swing (they all have vertical).

There doesn't happen to be an API endpoint to fetch a devices' capabilities?

bigmoby commented 1 month ago

Ok thank you for these interesting hints! So can you confirm that in the official FGLair app, for your AC, there aren't room temperature or swing mode?

picnicbob commented 1 month ago

IMG_7084 IMG_7085 Not that I can see

picnicbob commented 1 month ago

IMG_7086

totorb2x commented 1 month ago

Same issue for me

2024-08-07 12:51:12.077 DEBUG (MainThread) [custom_components.fglair_heatpump_controller] Finished fetching fglair_heatpump_controller data in 0.477 seconds (success: True) 2024-08-07 12:51:12.078 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate async_setup_entry called 2024-08-07 12:51:12.557 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] async_setup_entry called with AC000W002905713 - eu - token.txt - 2.0
2024-08-07 12:51:12.558 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate init called for dsn: AC000W002905713 2024-08-07 12:51:12.559 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Update FujitsuClimate device by async_update 2024-08-07 12:51:13.201 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate return device name [AC-UTY-a0cc2bf20410] 2024-08-07 12:51:13.201 ERROR (MainThread) [homeassistant.components.climate] fglair_heatpump_controller: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update await self.async_update() File "/config/custom_components/fglair_heatpump_controller/climate.py", line 414, in async_update await self._fujitsu_device.async_get_display_temperature_degree() File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 331, in async_get_display_temperature_degree display_temperature_value = self._display_temperature["value"]


KeyError: 'value'
charstring1 commented 1 month ago

Same issue for me, following. Here are my logs:

Logger: homeassistant.components.climate
  Source: helpers/entity_platform.py:72
  integration: Climate (documentation, issues)
  First occurred: 11:14:41 AM (2 occurrences)
  Last logged: 11:20:53 AM

  fglair_heatpump_controller: Error on device update!
  Traceback (most recent call last):
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
      await entity.async_device_update(warning=False)
    File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
      await self.async_update()
    File "/config/custom_components/fglair_heatpump_controller/climate.py", line 414, in async_update
      await self._fujitsu_device.async_get_display_temperature_degree()
    File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 331, in async_get_display_temperature_degree
      display_temperature_value = self._display_temperature["value"]
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  KeyError: 'value'
totorb2x commented 1 month ago

Here's my bandaid fix to work around it:

on my HA server, I edited /config/custom_components/fglair_heatpump_controller/climate.py by commenting out lines 418 through 420:

image

probably could do a try/except but I didn't bother since I don't care about displaying the current temp.

Then in def swing_mode() around line 490, i added a hard code to set the swing mode and an early return to avoid going into more code that crashes:

image

Of course this is a very crude bandaid fix but it got my devices to load correctly on my dashboard and i can set the mode and temp which is all I need.

I ve trying your bandaid fix , doesn't work for me :(

johncosker commented 1 month ago

What is the error log saying?

totorb2x commented 1 month ago

What is the error log saying?

2024-08-08` 09:11:18.594 DEBUG (MainThread) [custom_components.fglair_heatpump_controller] Finished fetching fglair_heatpump_controller data in 0.493 seconds (success: True)
2024-08-08 09:11:18.595 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate async_setup_entry called
2024-08-08 09:11:19.055 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] async_setup_entry called with AC000W002905713 - eu - token.txt - 2.0  
2024-08-08 09:11:19.056 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate init called for dsn: AC000W002905713
2024-08-08 09:11:19.056 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Update FujitsuClimate device by async_update
2024-08-08 09:11:19.694 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate return device name [AC-UTY-a0cc2bf20410]
2024-08-08 09:11:19.695 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Last refreshed update date [2024-08-08 07:09:50+00:00]
2024-08-08 09:11:19.700 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate device [AC-UTY-a0cc2bf20410] return fan_mode [auto]
2024-08-08 09:11:19.701 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate device [AC-UTY-a0cc2bf20410] return current operation_mode [0] ; operation_mode_desc [off] ; translated into [off]
2024-08-08 09:11:19.701 ERROR (MainThread) [homeassistant.components.climate] fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
    await self.async_update()
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 422, in async_update
    self._swing_modes = self.swing_modes
                        ^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 526, in swing_modes
    vert_pos_list: list[str] = self._fujitsu_device.vane_vertical_positions()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 221, in vane_vertical_positions
    array = np.arange(1, self.get_af_vertical_num_dir()["value"] + 1)
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'

Log recovered after applying your bandaid fix

yogevabr1 commented 3 weeks ago

I have the same issue here, also the same log before, and same log as @totorb2x after the workaround.

yogevabr1 commented 3 weeks ago

I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:

Screenshot 2024-08-18 at 18 06 21

Restart HA, now you will get your AC entities.

totorb2x commented 3 weeks ago

I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:

Screenshot 2024-08-18 at 18 06 21

Restart HA, now you will get your AC entities.

Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.

yogevabr1 commented 3 weeks ago

I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:

Screenshot 2024-08-18 at 18 06 21

Restart HA, now you will get your AC entities.

Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.

You can, just add climate card and you will have all relevant functionality.

totorb2x commented 3 weeks ago

I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:

Screenshot 2024-08-18 at 18 06 21

Restart HA, now you will get your AC entities.

Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.

You can, just add climate card and you will have all relevant functionality.

I just tried. I can only see the status of the air conditioner. Maybe I'm doing it wrong?

Edit: Nevermind, that s work :)

yogevabr1 commented 3 weeks ago

Have you tried to use the built in climate card? I did, and I have an AC functionality

On Sun, 18 Aug 2024 at 18:41 totorb2x @.***> wrote:

I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but: [image: Screenshot 2024-08-18 at 18 06 21] https://private-user-images.githubusercontent.com/16595405/358915722-965bbbf3-52ee-4b9b-8855-53433f326284.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5OTUwNDAsIm5iZiI6MTcyMzk5NDc0MCwicGF0aCI6Ii8xNjU5NTQwNS8zNTg5MTU3MjItOTY1YmJiZjMtNTJlZS00YjliLTg4NTUtNTM0MzNmMzI2Mjg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE1MjU0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJlOWVkZTZjYWM4MGVlZDMyYjcwMzVhYjM3MWFlYzI5ODUzOWYxYmEwMGIyODQzNTgzZDExMjFjNDBiYWE4ZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.L94IQyPnMLu_Gu3k5Ffyy0YAuLMy6LGnb4XPeRvIRY0 Restart HA, now you will get your AC entities.

Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.

You can, just add climate card and you will have all relevant functionality.

I just tried. I can only see the status of the air conditioner. Maybe I'm doing it wrong?

— Reply to this email directly, view it on GitHub https://github.com/bigmoby/fglair_for_homeassistant/issues/151#issuecomment-2295305161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6TTTPFLHMZIXYU3ZD7UA3ZSC6DTAVCNFSM6AAAAABLAVCOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMYDKMJWGE . You are receiving this because you commented.Message ID: @.***>

totorb2x commented 3 weeks ago

I tried adding a badge. Using YAML mode, I can't find a "climate" entity. When I add by entity I only find the entity "climate.ac_uty_a0cc2bf20410". This one offers me only one “badge”: the mode. On the other hand, under Google Home, I see everything correctly.

bigmoby commented 3 weeks ago

Please try the latest version of the fglair component: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.17

yogevabr1 commented 3 weeks ago

Does it have a fix? I don't want it to override the workaround in case of not...

On Mon, 19 Aug 2024 at 11:42, BigMoby @.***> wrote:

Please try the latest version of the fglair component: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.17

— Reply to this email directly, view it on GitHub https://github.com/bigmoby/fglair_for_homeassistant/issues/151#issuecomment-2296005939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6TTTKA2KLWLQ2JQEYNCQ3ZSGVXPAVCNFSM6AAAAABLAVCOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGAYDKOJTHE . You are receiving this because you commented.Message ID: @.***>

Blizzke commented 3 weeks ago

It's still not working...

Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:727
integration: Climate (documentation, issues)
First occurred: 10:45:38 (6 occurrences)
Last logged: 10:46:16

fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
    await self.async_update()
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 422, in async_update
    self._swing_modes = self.swing_modes
                        ^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 531, in swing_modes
    self._fujitsu_device.vane_horizontal_positions()
  File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 268, in vane_horizontal_positions
    array = np.arange(1, self.get_af_horizontal_num_dir()["value"] + 1)
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'

Running on 0.3.17.

bigmoby commented 3 weeks ago

Does it have a fix? I don't want it to override the workaround in case of not... On Mon, 19 Aug 2024 at 11:42, BigMoby @.> wrote: Please try the latest version of the fglair component: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.17 — Reply to this email directly, view it on GitHub <#151 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6TTTKA2KLWLQ2JQEYNCQ3ZSGVXPAVCNFSM6AAAAABLAVCOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGAYDKOJTHE . You are receiving this because you commented.Message ID: @.>

@yogevabr1 Unfortunately, this component is often seen as free (as in "free beer"), and my support is considered something 'owed.' If I responded to the issue by suggesting you try the next version, it was because I genuinely believed, to the best of my ability, that I had fixed the bug. If you're unwilling to test it and don't want to actively contribute to improving the code (you could have even created a PR to try to fix it, but you didn't), then you're also free to uninstall the component. It's up to you!

bigmoby commented 3 weeks ago

Hi @Blizzke I just released this version: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.18 I hope it fixes

Blizzke commented 3 weeks ago

@yogevabr1 Unfortunately, this component is often seen as free (as in "free beer"), and my support is considered something 'owed.' If I responded to the issue by suggesting you try the next version, it was because I genuinely believed, to the best of my ability, that I had fixed the bug. If you're unwilling to test it and don't want to actively contribute to improving the code (you could have even created a PR to try to fix it, but you didn't), then you're also free to uninstall the component. It's up to you!

Perfectly understandable reaction from your end, but the "fix" was more of a "rip everything out that doesn't work for you". Perhaps that is not the sort of PR you want? :-) In any case, if I find the time I might try to set up a venv for testing/debugging it here but I haven't had the chance yet so far.

As for 0.3.18, we got past the horizontal here but now it's the vertical again:

Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:727
integration: Climate (documentation, issues)
First occurred: 11:28:38 (3 occurrences)
Last logged: 11:28:38

fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
    await self.async_update()
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 422, in async_update
    self._swing_modes = self.swing_modes
                        ^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 536, in swing_modes
    modes_list = self._fujitsu_device.get_swing_modes_supported()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 204, in get_swing_modes_supported
    if self.get_af_vertical_direction()["value"] is not None:
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'
bigmoby commented 3 weeks ago

Perfectly understandable reaction from your end, but the "fix" was more of a "rip everything out that doesn't work for you". Perhaps that is not the sort of PR you want? :-)

Yes, not the best solution! :-D

bigmoby commented 3 weeks ago

Hi @Blizzke here again...https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.19 I'm sorry for this "trial and error" approach

Blizzke commented 3 weeks ago

I'll be darned :-)

Screenshot_20240819_120824

It is picking up the entities now and I can control them, which is awesome! So big thank you for that.

As an FYI, since those were the errors: I don't see any swing support at all. For my situation: none of the 3 have a display (so guess there will not be a temperature reading in the readout) Living: has vertical and horizontal swing Office / Bedroom: Both have vertical swing.

If you need more information, perhaps you can add a sort of a capabilities dump when the debug mode is enabled that can be posted here?

bigmoby commented 3 weeks ago

Hi @Blizzke , great it sounds good. In your FGLair mobile app have you current temperature param shown? Have you different swing mode operation choices?

Blizzke commented 3 weeks ago

Only the target temperature, not the current one. I do have the swing settings in the app:

IMG_2859 IMG_2860

bigmoby commented 3 weeks ago

Oook, so current temperature issue ✅ ...it's not supported by your AC unit and then is not shown by the component. What happens if you select a swing mode that doesn't appear in the HA component? Does something happen or is it not supported even when selected from the mobile app?

Blizzke commented 3 weeks ago

From the app everything works. For Office/Bedroom i can modify vertical or have it auto swing, for Living Room I can change both vertical/horizontal. In HA I don't see anything resembling a swing mode in the component, perhaps I am overlooking it?

Screenshot_20240819_130235

Nothing under settings either, that is HA stuff.

bigmoby commented 3 weeks ago

Hi @Blizzke , please if you could follow these steps:

import aiohttp
import asyncio

async def main():
    print("Testing FGLairApiClient...")

    username = "your-userid-here"
    password = "your-password-here"
    region = "eu"
    tokenpath = "token.txt"
    temperature_offset = 0

    session = aiohttp.ClientSession()
    client = FGLairApiClient(username, password, region, tokenpath, session)

    if not await client.async_authenticate():
        print("Unable to authenticate with Fujistsu General")

    devices = await client.async_get_devices_dsn()
    print("devices ---->>>")
    print(devices)
    splitac = SplitAC(devices[0], client, tokenpath, temperature_offset)
    properties = await splitac.async_update_properties()

    # print("Properties ---->>>", properties)

    print("device name ---->>> %s", splitac.get_device_name())
    print("op_status_desc ---->>>", splitac.get_op_status_desc())
    print("display_temperature ---->>>", splitac.get_display_temperature())

    # invoke_refresh_prop = await splitac.async_set_refresh(1)
    invoke_refresh_prop = splitac.get_refresh()
    print("invoke_refresh_prop ---->>>", invoke_refresh_prop)

    display_temperature_degree = await splitac.async_get_display_temperature_degree()
    print("display_temperature_degree ---->>>", display_temperature_degree)

    fan_speed_desc = splitac.get_fan_speed_desc()
    print("fan_speed_desc ---->>>", fan_speed_desc)

    swing_modes_supported = splitac.get_swing_modes_supported()
    print("swing_modes_supported ---->>>", swing_modes_supported)

    vertical_direction = splitac.get_af_vertical_direction()
    print("vertical_direction ---->>>", vertical_direction)

    horizontal_direction = splitac.get_af_horizontal_direction()
    print("horizontal_direction ---->>>", horizontal_direction)

    await session.close()

if __name__ == "__main__":
    asyncio.run(main())

Thanks

picnicbob commented 3 weeks ago

It's working for me, thank you! I see some are still having issues so I will leave the issue open for now.

Blizzke commented 3 weeks ago

Hi @Blizzke , please if you could follow these steps:

* clone the repo `git clone https://github.com/bigmoby/pyfujitsugeneral`
* append this code (please remember to edit accordingly with you userid and password) at the end of the splitAC.py 

If other people want to try, it's slightly more involved than just cloning the repo and adding the code. Preferably you'll first create a virtualenv (if you want to separate the extra packages). Then install the required packages:

python -m pip install numpy aiofiles aiohttp

After that you can run it from the repository root with PYTHON_PATH, so it knows where to find the pyfujitsugeneral package:

PYHON_PATH=. .venv/bin/python -m pyfujitsugeneral.splitAC

The output is:

Testing FGLairApiClient...
/home/steve/.pyenv/versions/3.12.3/lib/python3.12/json/__init__.py:180: RuntimeWarning: coroutine '_make_delegate_method.<locals>.method' was never awaited
  fp.write(chunk)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
devices ---->>>
['AC000W00......', 'AC000W00....., 'AC000W00.....']
device name ---->>> %s {'value': 'Living Room', 'key': 6.......8}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6.......8, 'data_updated_at': '2024-08-19T14:11:27Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}

(re-added this since I don't really want to add any keys / device-ids here)

bigmoby commented 3 weeks ago

If other people want to try, it's slightly more involved than just cloning the repo and adding the code. Preferably you'll first create a virtualenv (if you want to separate the extra packages). Then install the required packages:

I suggest you pip install -r requirements.txt

Blizzke commented 3 weeks ago

If other people want to try, it's slightly more involved than just cloning the repo and adding the code. Preferably you'll first create a virtualenv (if you want to separate the extra packages). Then install the required packages:

I suggest you pip install -r requirements.txt

Naturally, thank you :) Had to do this between "soup and potatoes" as we say in Belgium so didn't even check.

bigmoby commented 3 weeks ago

I don't know the term "soup and potatoes" 😅 ...both too hot for the Sicilian climate! But I think I understood well! 😄 Please could check also for the others devices? You should edit this line

splitac = SplitAC(devices[0], client, tokenpath, temperature_offset)

and print for devices[1] and devices[2]

bigmoby commented 3 weeks ago

For your first device, Living room, it's pretty clear that:

display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}

so I don't understand how, from the mobile app, the swing mode is supported! 🤷‍♂️ And also the temperature param is not supported...

Blizzke commented 3 weeks ago

"between soup and potatoes" simply means quickly between 2 other things ;-)

Anyway:

Testing FGLairApiClient...
/home/steve/.pyenv/versions/3.12.3/lib/python3.12/json/__init__.py:180: RuntimeWarning: coroutine '_make_delegate_method.<locals>.method' was never awaited
  fp.write(chunk)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

device ---->>> AC000W00.......
device name ---->>> %s {'value': 'Living Room', 'key': 6........}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6........, 'data_updated_at': '2024-08-19T14:47:29Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}

device ---->>> AC000W00.......
device name ---->>> %s {'value': 'Office', 'key': 6........}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6........, 'data_updated_at': '2024-08-19T14:46:30Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}

device ---->>> AC000W.......
device name ---->>> %s {'value': 'Bedroom', 'key': 6........}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6........, 'data_updated_at': '2024-08-19T14:46:28Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}

None of them seem to give any indication that they have swing support via your test code, yet i can control that using FGLAir for all 3 of them.

bigmoby commented 3 weeks ago

Oook...so the component, from my point of view, seems correct! ...no vertical_direction or horizontal_direction, I've no other hints to know if swing mode is supported or not.

bigmoby commented 3 weeks ago

@Blizzke could you post all the properties related to a device?

Blizzke commented 3 weeks ago

@Blizzke could you post all the properties related to a device?

Yeah, this is for the "Living Room":

(name: base_type / direction / display_name)

adjust_temperature: integer / input / adjust_temperature
adjust_temp_res_C: integer / output / adjust_temp_res_C
adjust_temp_res_F: integer / output / adjust_temp_res_F
af_horizontal_move_step1: integer / input / af_horizontal_move_step1
af_vertical_move_step1: integer / input / af_vertical_move_step1
building_name: string / input / building_name
child_lock_mode: boolean / input / child_lock_mode
child_lock_pin: string / input / child_lock_pin
common_zone_num_outlets: integer / input / common_zone_num_outlets
comm_version: integer / output / comm_version
damper_type_setting: boolean / input / damper_type_setting
day_name: string / input / day_name
day_night_all_setting: integer / input / day_night_all_setting
demand_control: integer / output / demand_control
device_capabilities: integer / output / device_capabilities
device_name: string / input / device_name
economy_mode: boolean / input / economy_mode
error_code: integer / output / error_code
fan_speed: integer / input / fan_speed
filter_clean: boolean / input / filter_clean
filter_sign_reset_display: boolean / input / filter_sign_reset_display
inner_unit_name: string / input / inner_unit_name
master_timer_on_off_1: boolean / input / master_timer_on_off_1
master_timer_on_off_2: boolean / input / master_timer_on_off_2
mcu_error: integer / input / mcu_error
mcu_fw_version: string / output / mcu_fw_version
model_name: string / input / model_name
night_name: string / input / night_name
operation_mode: integer / input / operation_mode
option_sensor_1_connection: boolean / input / option_sensor_1_connection
option_sensor_1_name: string / input / option_sensor_1_name
option_sensor_2_connection: boolean / input / option_sensor_2_connection
option_sensor_2_name: string / input / option_sensor_2_name
op_status: integer / output / op_status
rc_prohibition: integer / input / rc_prohibition
reboot_range: integer / input / reboot_range
reboot_start: integer / input / reboot_start
refresh: boolean / input / refresh
room_temp_sensor_day_reg: integer / input / room_temp_sensor_day_reg
room_temp_sensor_night_reg: integer / input / room_temp_sensor_night_reg
room_temp_sensor_setting: integer / input / room_temp_sensor_setting
service_contact_email: string / input / service_contact_email
service_contact_name: string / input / service_contact_name
service_contact_phone: string / input / service_contact_phone
service_function_address: integer / input / service_function_address
service_function_number: integer / input / service_function_number
service_function_setting: integer / input / service_function_setting
service_mode: boolean / input / service_mode
service_zone_function_num: integer / input / service_zone_function_num
service_zone_function_stg: integer / input / service_zone_function_stg
service_zone_mode: boolean / input / service_zone_mode
test_run: boolean / input / test_run
wifi_led_enable: boolean / input / wifi_led_enable
zones_configured: boolean / input / zones_configured
zone_1_day_night_reg: integer / input / zone_1_day_night_reg
zone_1_name: string / input / zone_1_name
zone_1_num_outlets: integer / input / zone_1_num_outlets
zone_1_open_close_setting: boolean / input / zone_1_open_close_setting
zone_2_day_night_reg: integer / input / zone_2_day_night_reg
zone_2_name: string / input / zone_2_name
zone_2_num_outlets: integer / input / zone_2_num_outlets
zone_2_open_close_setting: boolean / input / zone_2_open_close_setting
zone_3_day_night_reg: integer / input / zone_3_day_night_reg
zone_3_name: string / input / zone_3_name
zone_3_num_outlets: integer / input / zone_3_num_outlets
zone_3_open_close_setting: boolean / input / zone_3_open_close_setting
zone_4_day_night_reg: integer / input / zone_4_day_night_reg
zone_4_name: string / input / zone_4_name
zone_4_num_outlets: integer / input / zone_4_num_outlets
zone_4_open_close_setting: boolean / input / zone_4_open_close_setting
zone_5_day_night_reg: integer / input / zone_5_day_night_reg
zone_5_name: string / input / zone_5_name
zone_5_num_outlets: integer / input / zone_5_num_outlets
zone_5_open_close_setting: boolean / input / zone_5_open_close_setting
zone_6_day_night_reg: integer / input / zone_6_day_night_reg
zone_6_name: string / input / zone_6_name
zone_6_num_outlets: integer / input / zone_6_num_outlets
zone_6_open_close_setting: boolean / input / zone_6_open_close_setting
zone_7_day_night_reg: integer / input / zone_7_day_night_reg
zone_7_name: string / input / zone_7_name
zone_7_num_outlets: integer / input / zone_7_num_outlets
zone_7_open_close_setting: boolean / input / zone_7_open_close_setting
zone_8_day_night_reg: integer / input / zone_8_day_night_reg
zone_8_name: string / input / zone_8_name
zone_8_num_outlets: integer / input / zone_8_num_outlets
zone_8_open_close_setting: boolean / input / zone_8_open_close_setting
zone_cont_child_name: string / input / zone_cont_child_name
zone_cont_parent_name: string / input / zone_cont_parent_name
zone_cont_sensor_child: boolean / input / zone_cont_sensor_child
zone_cont_sensor_parent: boolean / input / zone_cont_sensor_parent
zone_device_capabilities: integer / output / zone_device_capabilities
zone_open_close_setting: integer / input / zone_open_close_setting
bigmoby commented 3 weeks ago

Ops, you could simply uncomment print("Properties ---->>>", properties)

Blizzke commented 3 weeks ago

Ops, you could simply uncomment print("Properties ---->>>", properties)

I know, but i still don't feel comfortable posting data that is called "key" on github. I can mail you the dump if you want.

bigmoby commented 3 weeks ago

Uh, no, no problem at all! I don't think there're sensitive or private information...anyway, no problem at all!