View your medication from Medisafe Cloud in Home Assistant. This integration adds sensors for today's upcoming, taken, skipped, and missed doses, plus sensors for each medication's remaining pills. The integration also provides a calendar of upcoming events and a to-do list of medication that need to be refilled.
- Add
https://github.com/c99koder/ha-medisafe
as a custom repository as Type:Integration
- Click install under "Medisafe" in the Integration tab
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Medisafe"
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledmedisafe
. - Download all the files from the
custom_components/medisafe/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Medisafe"
Using your HA configuration directory (folder) as a starting point you should now also have this:
custom_components/medisafe/sensor.py
custom_components/medisafe/__init__.py
custom_components/medisafe/api.py
custom_components/medisafe/manifest.json
custom_components/medisafe/translations
custom_components/medisafe/translations/en.json
custom_components/medisafe/const.py
custom_components/medisafe/config_flow.py
Data is updated every 15 minutes, which can be adjusted by changing SCAN_INTERVAL
in __init__.py
.
The sample card above was built using auto-entities:
type: horizontal-stack
cards:
- type: entity
entity: sensor.medication_taken
name: Taken
- type: entity
entity: sensor.medication_missed
name: Missed
- type: entity
entity: sensor.medication_dismissed
name: Skipped
type: custom:auto-entities
filter:
include:
- attributes:
integration: medisafe
exclude:
- entity_id: sensor.medication_*
- entity_id: calendar.*
- entity_id: todo.*
sort:
method: state
numeric: true
card:
type: glance
title: Remaining Medication
columns: 4
If you want to contribute to this please read the Contribution guidelines
This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.
Code template was mainly taken from @Ludeeus's integration_blueprint template
Copyright (C) 2024 Sam Steele. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.