# \[Homeyduino\] E-paper for Homey

**URL:** <https://community.homey.app/t/homeyduino-e-paper-for-homey/74640>\
**Category:** Devices\
**Created:** [January 5, 2023, 3:37pm UTC](https://community.homey.app/t/homeyduino-e-paper-for-homey/74640 "2023-01-05T15:37:04Z")\
**Posts on this page:** 1\
**Showing post:** 113

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [January 24, 2023, 5:38pm UTC](https://community.homey.app/t/homeyduino-e-paper-for-homey/74640/113 "2023-01-24T17:38:02Z")

</div>

Some follow up on my issue’s:

> [@Torch1969](#):
>
> Also don’t get any triggers (for instance paperScreenOnline trigger when paper screen wakes up from deep sleep).

This is solved bij reverting back to version 1.2.2 (still with standard Homeyduino app)

> [@Torch1969](#):
>
> And somehow I cannot disable deep sleep (sending value 0 doesn’t seem to work). The screen starts flashing, but after that the e-paper is still going into deep sleep.

I solved this. Looks like this is a bug in the e-paper code. 🤔  
When changing the deep sleep time to zero (to disable deep sleep), this value isn’t stored in preferences. So after restarting (what the screen does when changing deep sleep), this value is lost and the screen finds the previous value in preferences ☹

So I added 2 lines of code after row 43 (inspired by the code above from row 37) in File HomeyFunction.ino, function setTimeDeepSleep.

Old code:

```auto
  if (value.toInt() == 0) {
    preferences.putBool("deepSleepEnable", false);
    ESP.restart();

```

New code:

```auto
  if (value.toInt() == 0) {
    preferences.putInt("timeToSleep", value.toInt());
    preferences.putBool("deepSleepEnable", false);
    delay(1000);
    ESP.restart();

```

Now it works 🤪

@sebyldino can you fix this in new version of homey e-paper code? Or do you want to have a GitHub bug report on this?

---

_[View the full topic](https://community.homey.app/t/homeyduino-e-paper-for-homey/74640)._
