How kostinos/hass-mosru-water works
MOS.RU Water Meter is a Home Assistant integration that authenticates to mos.ru by QR, discovers a household’s water meters, and sends readings from configured HA sensors automatically or on demand. Setup and reauthentication are handled in the config flow; the coordinator reads portal state, refreshes sessions, and owns scheduled/manual submissions. Entities expose portal readings, submission state, inspection details, availability, and a manual button. The README also documents explicit replacement of the latest portal reading. Arrows follow excerpts and README statements; unsampled capabilities are included only where documented.
Main entry points: coordinator.py Update coordinator · config_flow.py Setup and QR flow · __init__.py Integration services · button.py Manual submit button
Components 11
Setup and access
- Setup and QR flow
custom_components/mosru_water/config_flow.py - Integration settings
custom_components/mosru_water/const.py
Reading workflow
- Update coordinator
custom_components/mosru_water/coordinator.py - Integration services
custom_components/mosru_water/__init__.py
Home Assistant entities
- Manual submit button
custom_components/mosru_water/button.py - Status and meter sensors
custom_components/mosru_water/sensor.py - Device metadata
custom_components/mosru_water/entity.py
Portal integration
- MOS.RU API client
custom_components/mosru_water/api.py - mos.ru / ed.mos.ru
Other components
- Home Assistant user
- Water sensors
Connections 15
- Home Assistant user → Setup and QR flow: configures
README.md - Setup and QR flow → MOS.RU API client: authenticates and discovers
custom_components/mosru_water/config_flow.py - Setup and QR flow → mos.ru / ed.mos.ru: QR login
README.md - Setup and QR flow → Integration settings: stores settings
custom_components/mosru_water/config_flow.py - Water sensors → Update coordinator: provides readings
custom_components/mosru_water/coordinator.py - Integration services → Update coordinator: creates and refreshes
custom_components/mosru_water/__init__.py - Update coordinator → MOS.RU API client: reads and submits
custom_components/mosru_water/coordinator.py - MOS.RU API client → mos.ru / ed.mos.ru: calls portal API
README.md - Home Assistant user → Manual submit button: presses
README.md - Manual submit button → Update coordinator: submits now
custom_components/mosru_water/button.py - Home Assistant user → Integration services: requests replacement
README.md - Integration services → Update coordinator: replaces readings
custom_components/mosru_water/__init__.py - Update coordinator → Status and meter sensors: publishes update data
custom_components/mosru_water/sensor.py - Device metadata → Status and meter sensors: provides device identity
custom_components/mosru_water/sensor.py - Device metadata → Manual submit button: provides device identity
custom_components/mosru_water/button.py