• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

maximunited / imou_life / 25139097652
90%

Build:
DEFAULT BRANCH: master
Ran 29 Apr 2026 11:27PM UTC
Jobs 3
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Apr 2026 11:25PM UTC coverage: 71.03% (-0.2%) from 71.196%
25139097652

push

github

web-flow
fix: URL field now auto-populates and shows required asterisk for custom (#14)

* fix: URL field now auto-populates and shows required asterisk for custom

Fixed multiple URL field behavior issues in config flow:

**Bug Fixes:**
1. **URL field now always visible with auto-population**
   - URL field now appears for all server selections
   - Auto-populates with the correct URL based on server selection
   - For preset servers: shows as Optional with auto-populated value
   - For "Custom" server: shows as Required (with asterisk) with empty default

2. **URL field properly marked as required for custom servers**
   - When "Custom" is selected, field shows asterisk (*)
   - Empty URL validation triggers error message
   - Clear indication that the field must be filled

**How It Works Now:**
- **Preset Server Selected (Global, Frankfurt, etc.)**:
  - URL field shows the auto-populated API endpoint
  - Field is Optional (no asterisk)
  - User can see which URL will be used
  - Description: "Auto-populated based on server selection"

- **Custom Server Selected**:
  - URL field is empty
  - Field is Required (shows asterisk *)
  - Validation enforces non-empty value
  - Description: "Auto-populated based on server selection. Only edit if using a custom API server."

**Technical Changes:**
- Schema building logic now conditional based on selected server
- For custom: `vol.Required(CONF_API_URL, default="")`
- For preset: `vol.Optional(CONF_API_URL, default=<server_url>)`
- URL field always present, but requirement level changes dynamically

**Tests:**
- Added test for URL field auto-population
- Added test for URL field validation
- All 231 unit tests passing
- Pre-commit hooks passing

**Note on Limitations:**
Home Assistant's config flow is not reactive - the form only updates on submit, not when dropdown changes. So users will see the updated URL field after submitting the form once, not immediately when selecting a different server.

Co-Authored-By: Clau... (continued)

0 of 13 new or added lines in 1 file covered. (0.0%)

917 of 1291 relevant lines covered (71.03%)

2.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
0.0
0.0% custom_components/imou_life/config_flow.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.12 - 25139097652.1 29 Apr 2026 11:27PM UTC 20
71.03
GitHub Action Run
2 run-3.11 - 25139097652.2 29 Apr 2026 11:27PM UTC 20
71.03
GitHub Action Run
3 run-3.13 - 25139097652.3 29 Apr 2026 11:27PM UTC 20
71.03
GitHub Action Run
Source Files on build 25139097652
  • Tree
  • List 20
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25139097652
  • b290b92b on github
  • Prev Build on master (#25138390026)
  • Next Build on master (#25139135577)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc